reset errors for the input even if it was not touched before

pull/479/head
slowbackspace 5 years ago
parent d9e03c898a
commit f60ddec70f

@ -57,6 +57,8 @@ export default (state: State = initialState, action: Action): State => {
return {
...state,
touched: [...state.touched, action.inputName],
// reset errors for the input even if it was not touched before
errors: state.errors.filter(error => error.inputName !== inputName),
};
}
return {

Loading…
Cancel
Save