-
Notifications
You must be signed in to change notification settings - Fork 23
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
Unable to remove validation for some specific field conditionally #7
Comments
Hi @akash-int, |
Hi @llauderesv // form related code start // Create your own validationStateSchema const { const { designation, email } = values; /* Method is responsible for API call */ /* Method is responsible for changing Designation Value */ return ( <Form.Row> <Form.Group> {errors.designation && dirty.designation && ( <Form.Text className="text-danger text-left"> {errors.designation} </Form.Text> )} </Form.Group> {/* email */} <Form.Group> <Form.Control type="email" placeholder="Email" size="lg" name="email" value={email} onChange={handleOnChange} /> {errors.email && dirty.email && ( <Form.Text className="text-danger text-left"> {errors.email} </Form.Text> )} </Form.Group> </Form.Row> </> |
Hi @akash-int,
|
Hi @llauderesv
If again I change the value from the dropdown I have to add validation to all other fields :-( After implementing your example form is not validating. It remains still disabled as I have not provided all other fields data. This is my actual state schema |
Hi @llauderesv
Thanks in advance. |
Hi @akash-int |
Hi @llauderesv |
Hi @llauderesv
Unable to remove validation for some specific field conditionally.
The text was updated successfully, but these errors were encountered: