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
Date type max attribute collision with max validaton #814
Comments
Moreover, if you have numeric value in data-parsley-value, you get 'You must validate an object or a string' |
@guillaumepotier This seems like a pretty big oversight. Do you know if anyone is working on it already? If not, is there any specific way you'd like to see this implemented? Or is the preferred approach to use custom validators for date ranges? |
Nobody is working on it, and it should definitely be fixed! The
|
+1 on this. It looks like there is no date validator in parsley, so actually, I guess |
I'm running into the same problem, and am working on a fix here: https://github.com/WebHare/Parsley.js/tree/fix-814 I'm not sure how to deal with the error reporting. It will now return 'This value seems to be invalid.'. Ideally I would use the standard min,max and range' errors, but then I'd run into locale issues on properly formatting the date in the response. I'll submit it as a PR anyway, as input type=date with min/max/range is currently broken anyway. |
Still not solved ? I have the issue while putting a min on input type="date"... |
I'm afraid not. There's a PR in the works, although I suspect there is a better approach to improve the range/min/max validators. |
Any news on this? |
i've created a pull request (#1158) for this one. |
@Thumbleweed I had to do that yes, and then create a custom validator for min and another for max. Would be better to see parsley supporting that natively than hiding the problem though... |
That is true @Flaburgan . my pull request just prevents parsley from breaking when using a min/max attribute on a date field. |
I took a stab at If interested, have a look at #1168 |
Fixed in 2.7.0. |
I want to have the attribute 'max' on date type input, and I just want to make sure parsley is validating the presence of value. However, due to the fact that parsely is using the keyword max to validate integer values, it's suggesting that the date type file is invalid although such type of validation is not required.
The text was updated successfully, but these errors were encountered: