Closed (fixed)
Project:
Clientside Validation
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Reporter:
Created:
31 Aug 2012 at 12:34 UTC
Updated:
25 Jan 2013 at 19:00 UTC
Jump to comment: Most recent file
Comments
Comment #1
jelle_sFixed in the latest dev version. Thanks for the report
Comment #2
kalabroMaybe it should be feature request.
Validation for date formats like
'Y'still doesn't work. For now Clientside Validation requires day and month input for date fields.Comment #3
jelle_sDid you try the latest version from git or from drupal.org? drupal.org takes +/- 12hours to sync with git so you might have been using the old version...
Comment #4
kalabroSure. I pulled latest 7.x-1.x.
I guess we didn't understand each other.
I have date field with date_text widget with custom format: http://drupal.org/files/2012-09-03_16-47-48.png
This format ignored in Javascript dateFormat validator: http://drupal.org/files/2012-09-03_16-49-45.png
Comment #5
kalabroI think I could prepare a patch when I will have some free time. For now I just ignored validation for my date field.
Comment #6
jelle_sHave you cleared your cache? The 'format' is not really needed in the js code, as you can see in your screenshot, 'daypos' and 'monthpos' are both false, so we know we shouldn't expect a date part or a month part. here's what I have:
Settings:

Form:

Comment #7
kalabroHm.

I pulled code with git pull origin 7.x-1.x, cleared cache, tested in Firefox and Chrome.
It looks like this for me:
So date is “Invalid Date” and false is returned.
Comment #8
kalabrooh, js wasn't updated! My fault!
Comment #9
jelle_sSorry about that, I committed but forgot to push... should really be fixed now.
Comment #10
jelle_ssee ee02ea7
Comment #11
kalabroI already got it, thanks! :)

I think we have to improve it.
Comment #12
attiks commentedComment #13
jelle_sFixed in latest dev version.
Comment #14
kpaxman commentedI've noticed that date validation fails when text is used instead of numbers, e.g. "Feb 1 2012".
I'm putting together a mapping but this is quite possibly not the best way.
Comment #15
liam morland@kpaxman I've moved your issue to #1886424: Date validation fails when text is used instead of numbers.