Regular expression for validating date format mmddyyyy in asp net batang konek ank malay

posted by | Leave a comment

I want to check the date which must be in format : dd-mm-yyyy using regular expression. I am using Regular Expression Validator for checking the date. ^(((0[1-9]|[12]\d|3[01])/(0[13578]|1[02])/((19|[2-9]\d)\d))|((0[1-9]|[12]\d|30)/(0[13456789]|1[012])/((19|[2-9]\d)\d))|((0[1-9]|1\d|2[0-8])/02/((19|[2-9]\d)\d))|(29/02/((1[6-9]|[2-9]\d)(0[48]|[2468][048]|[13579][26])|((16|[2468][048]|[3579][26])00))))$ You could use a Custom Validator and have the client-side validation be simple and on the server-side use a Date Time. Although I suspect you don't need your code to work all the way to the year 9999 (no, I couldn't immediately see if the supplied regexes work that far into the future). I'm trying to help him, by explaining good coding practices. But both of you really think that this will validate a date? If you insist of using a regular expression to validate a date, you should use the expression provided by Shengqing Yang (? I'm not saying that you've a stupid idea, I'm just explaining that validation should at least be performed on server side.

Another option is j Query Picker/v2/demo/ Hope this will help A Masked Edit Extender is only working on client side, validation always needs to be done at serverside, client side validation is an extra! Your suggestion to use a ajax extender will only perform client side validation, which as I already explained, can only be used as an extra, because validation needs to be on server side, no matter what clientside validation was done already, because client side validation may never be trusted. try to put some informaion rather than trying to comment on suggestions. He's using an Expression validator which will perform validation on both client and server side. You may want to convert the regex string and test string to lowercase before testing (if your application allows). This will not catch days that don't exist, like Feb 30th, June 31st, etc.Trying to validate a date with a regular expression is a good way to go quickly insane - getting it structured to accept all the days of each month, but not invalid days of each month causes a combinatorial explosion. you want to reject the 32nd of any month, the 31st for several months, including 06/31 of any year, you have to accept 02/28 every year but reject 02/29 most years, though you should accept it if the year is divisible by 4 but not if by 100, though if the year is divisible by 400 then 02/29 is ok.^(?

Leave a Reply

Free chat raw sex