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

noValidate doesn't work #134

Open
alburritos opened this issue Sep 14, 2017 · 4 comments
Open

noValidate doesn't work #134

alburritos opened this issue Sep 14, 2017 · 4 comments

Comments

@alburritos
Copy link

alburritos commented Sep 14, 2017

On the Form component, I have:

<Form
  noValidate
  type={ ... }
  ...>
  <Form.Field
     noValidate={ false }
   .../>
  <Form.Field
    noValidate={ true } .../>
</Form

I assume this means none of the children will be validated. Is there a way to disable validation on specific fields? I've tried throwing noValidate in Form.Field as specified here (tried including and excludingnoValidate in Form): http://jquense.github.io/react-formal/#/api/field?_k=01vpqu, but it doesn't seem to work.

@jquense
Copy link
Owner

jquense commented Sep 14, 2017

Hey there, noValidate works on both the Form and/or Field components. I confirmed that they are still working in the docs...if you aren't seeing the right behavior could you put together a repo via https://codesandbox.io/

@alburritos
Copy link
Author

@jquense Within a single form, are you able to validate certain fields, and ignore validation on other fields? For example, if I have yup.string().required() on a particular field, and that field has noValidate={ true }, the required message won't show and the validation won't occur.

@alburritos
Copy link
Author

alburritos commented Sep 14, 2017

Also, is the way I'm using it correct? I'm on 0.25.4

@jquense
Copy link
Owner

jquense commented Sep 14, 2017

yeah, <Form.Field noValidate /> should work as you're describing, it will not validate that field when you change it or submit the form.

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

2 participants