mobx-react-form
mobx-react-form copied to clipboard
.error ( and hasError) filled after clicking field without filling anything
E.g. i click field then click other field and the first field now has a error although i didnt enter anything yet Is it possible to display error only when user entered something? I tried to play with isPristine , isValid, hasError, focused properties without much luck. If i display based on isPristine and hasError - it work initially as i expect ( no error displayed when just clicking over fields). But then when i start to enter something a error immediately popin. If i add .focused to check the error wont appear after typing, but it will flash when going to next field.
The errors depend on the validation rules/functions (for example, if you don't need to show an error when the input is empty, just don't use the required
rule), or maybe you need to set the validateOnBlur
or showErrorsOnBlur
from option to false
.
My answer helped? Maybe I don't get the point, can you elaborate this better?
showErrorsOnBlur:false worked for me :) Thanks @foxhound87.