nhibernate - how do i validate date input in dd-mon-yyyy format in asp.net regularExpressionValidator? -
I really will give the DD-MONNDY-W format because my Oracle database accepts dates in this format.
Can I regulate like that, RegularExpressionValidator?
And also, do I have to convert the text box value to the Oracle data time format when using nibernate?
Many things to help;
Try for two digits for the year:
^ ([012]? \ D | 3 [01]) - ([JJ] [AA] [NN] | [FF] [EE] [BB] | [MM] [AR] [RR] | [AR] [ Pp] [rr] | [Mm] [come] [yy] | [jj] [uu] [nn] | [jj] [uu] [will] | [come] [uu] [gg] | [ S] [e] [ppp] | [w] [copy] [tt] | [nn] [w] [vv] | [dd] [e] [copy]] - \ d \ d $< / Pre>Four points for the year:
^ ([012]? \ D | 3 [01]) - [[JJ] [aa] [nn] | [ Ff] [e] [bb] | [Mm] [ar] [rr] | [ar] [pp] [rr] | [mm] [come] [yy] | [jj] [uu] [ Nn] | [jj] [uu] [will] | [come] [uu] [gg] | [ss] [E] [pp] | [w] [copy] [tt] | [nn] [oo] [vv] | [dd] [ee] [cc] - (19 | 20) \ d \ d $Those expressions mean:
- a number after 0 or 1 or 2, or 3 plus 0 or 1
- one dash next
- For months this Jane tries to have all the combinations of JN, January, January, etc ... for all twelve months
- next dash
- In the end, two digits for 'yyyy' version or 'Yy' version after 19 or 20
Comments
Post a Comment