Closed eliasisrael closed 7 years ago
this version of the syntax from 3.0.0 doesn't appear to work either:
var indicative = require('indicative');
myRules = {
"dateCreated": [
indicative.rule('date_format','YYYY-MM-ddTHH:mm:ss.SSSZ')
]
)
Will look into it now
Apparently, I didn't have the moment() syntax correct. This works:
myRules = { "dateCreated": [ indicative.rule('date_format','YYYY-MM-DDTHH:mm:ss.SSSZ') ] )
(note the 'DD') As a convenience, having a couple of common date formats built into the validator might be a nice-to-have.
Something like:
var myRules = { "dateCreated": "required|date_ISO8601" }
@eliasisrael you can create own validation rule exactly for this ;)
Yes, creating a custom rule makes more sense
For the life of me, I can't get this to work. Is there some trick?
won't accept:
Someone, please explain my dain bramage to me.