-
Notifications
You must be signed in to change notification settings - Fork 16
Closed
Description
I'm attempting to use moment.js for date validations, and I have a validation rule that's pretty much the same as the XDate example in the documentation:
birthdate: {
date: {
latest: moment().subtract(18, 'years'),
message: "^You need to be at least 18 years old"
}
},
but I get an "Uncaught TypeError: undefined is not a function validate.js:622". It appears it's attempting to call #parse where this is the validators object, not the datetime object, so it fails. I wonder if it's possible I'm calling validate() wrong and screwing up the context, but I can't find anything in my code that would cause that.
Anyway, I'll submit a pull request soon with a fix that works for me, but let me know if this is incorrect.
Metadata
Metadata
Assignees
Labels
No labels