-
-
Notifications
You must be signed in to change notification settings - Fork 25
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
Using .required('This field is required') is cleaner than invalidating… #461
Conversation
Hi @JulienRst Can you please review this and make sure that this is backward compatible or new major release is needed. |
Co-authored-by: Abhisek Pattnaik <[email protected]>
@abhisekp I suggest a new major release, as the change would allow empty phone number submits if the developer didn't explicitly define an .isRequired and is relying on the existing behavior to prevent empty phone numbers. |
@abhisekp I'm unsure how to proceed with the failed checks; they don't involve changes I made |
@nightness Sorry for the delay. Will look into this and make a major release. |
1 similar comment
@nightness Sorry for the delay. Will look into this and make a major release. |
This needs to be merged, all the default fields (like email) accept empty strings when not using .required(). This should work likewise. |
@abhisekp if you allow me to contribute, I can try to fix the branch |
This change allows .phone() to validate true for empty values so that .required can explain it's a required field. Examples...
Required
Not Required
Closes #313