simple-react-validator
simple-react-validator copied to clipboard
> @sachin8094 how to hide message after filling correct data
@sachin8094 Did you try to validate your input in the onBlur event? It works for me.
const [address, setAddress] = useState() const simpleValidator = useRef(new SimpleReactValidator()) <Input name="name" value={companyInformation.name} onChange={handleInputChange} onBlur={simpleValidator.current.showMessageFor('name')} /> {simpleValidator.current.message('name', companyInformation.name, 'required')}
I try this but it's showing errors on page load not on onblur
Originally posted by @pooja-yadav-ctrl in https://github.com/dockwa/simple-react-validator/issues/97#issuecomment-784217559