Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

conditional rendering error not hiding issue #475

Open
dmhd007 opened this issue Sep 11, 2023 · 0 comments
Open

conditional rendering error not hiding issue #475

dmhd007 opened this issue Sep 11, 2023 · 0 comments

Comments

@dmhd007
Copy link

dmhd007 commented Sep 11, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant