-
Notifications
You must be signed in to change notification settings - Fork 267
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
Remove incorrect validations #230
Remove incorrect validations #230
Conversation
The length of the format string does not necessarily match the length of the actual date, so this validation is incorrect. I'm not sure when this validation is useful anyways (if some malformed date comes in the field from the server I guess). In my opinion, the easiest way to fix this is to remove the validation. Users wanting client side validations in foundation should use `foundation-abide`.
I committed the |
4ff0f8e
to
c50ca61
Compare
I moved the |
@najlepsiwebdesigner Any news here? We'd prefer to not fork the library and have some valuable feedback from you :) |
Hi! I'm sorry for late answer, I am currently finishing my PhD so I'm "little bit" busy. I plan to review all the changes proposed in PRs and issues during August. Thank you for understanding ;) |
No problem, thank you, and good look with your PhD 💪. |
Hey @najlepsiwebdesigner, just a ping since it's september now. I hope you finished your PhD successfully and you're doing great! :) |
Any news? |
Thanks so much @najlepsiwebdesigner! |
Hi!
As mentioned in #176 & #209, the validation done by foundation-datepicker is incorrect since there's no guarantee that the length of the format string will match the actual length of a date. Moreover, this validation has been biting us in combination with the https://github.com/sgruhier/foundation_rails_helper gem. If a submitted form has errors in the date field, this gem will generate form input with "foundation friendly errors". However, this piece of JS will actually remove part of them making them look weird.
Also, in my opinion, users wanting to perform client side validations should use foundation-abide which is more powerful anyways.
So because of all of the above reasons, I think we should remove these incorrect validations from the library.
Fixes #176 & #209.