Regular expression for validating date of birth

The field will now accept input value like 1920, 2010 but would reject other values that fall outside the range.A regular expression may appear gibberish but they aren’t so difficult to read and understand if you can know the basic rules of the language.Character Limit – the default text box in a Google form allows users to input any number of characters but you can impose a limit with the help of regular expression.

regular expression for validating date of birth-29

Regular expressions are often used in input validations, parsing, and finding strings. Ignore Case parameter to make sure that Regex does not look for uppercase or lowercase. You'll likely want to use a Range Validator similar to what oned_gk suggested : Try sumitd answer string str Year = "1998"; string str Month = "4"; string str Day = "5"; Date Time d1 = Date Time. Try entering dates in the following format: yyyy-mm-dd If that doesn't work, double check the code you have htere and compare it to what I posted. That's why the single field validator I created doesn't work for you. Hello Mike, The date format I am using is yyyy/mm/dd, I would appreciate if you could please check my HTML code below. If i want to continue loading and load that record into some error can i do that? You want to validate dates in the traditional formats mm/dd/yy, mm/dd/yyyy, dd/mm/yy, and dd/mm/yyyy.

Leave a Reply