Skip to content

conditional rendering error not hiding issue #475

@dmhd007

Description

@dmhd007

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions