Monday, 15 August 2011

regex - Separate validation for day - month - year with Abide Foundation 4.3.2 -



regex - Separate validation for day - month - year with Abide Foundation 4.3.2 -

thank in advance help can provide.

i trying validate day / month / year separate fields (a limitation of scheme can building in) , having problem getting validation on these work.

i have tried adding custom patterns (throws console errors) , adding regex fields (no errors, invalid if date valid).

any help great.

code snippets:

i have tried adding custom patterns eg:

abide : { patterns: { day_only: /0[1-9]|1[0-9]|2[0-9]|3[01]/, month_only: /0[1-9]|1[012]/, year_only: /.]\/(19|20)\d\d/, }

}

and adding regex fields straight (escaping special characters) - no errors, wrong validation

<input type="tel" id="policyholder.dobdd" name="personalform.dobdd" placeholder="dd" size="2" maxlength="2" required pattern="/(0/[1/-9/]/|/[12/]/\d/|3/[01/]/)" />

/ /

regex validation zurb-foundation

No comments:

Post a Comment