simple-react-validator
simple-react-validator copied to clipboard
conditional rendering error not hiding issue
hi team , for conditional rendering fields how can i use simple-react-validator ?
{application?.isListed === 'Y' ? <TextField name='nameOfListed' value={application?.nameOfListed} onChange={onChange} onBlur={simpleValidator.current.showMessageFor('nameOfListed')} />
{simpleValidator.current.message('nameOfListed', application?.nameOfListed, 'required')}
: ''}
issue is when i change application?.isListed to 'N' , the field hidden , but validation error exists on validator.current.getErrorMessages()
@stuyam