Validation control issues...
-
i am using visual studio 2003 primarily i am experiencing difficulties with the range validator.. i am trying to create a range for a password field ! i have the max value set to 12 and the min set to 6 type = string this was generating an error at compile time. i read on another forum that this could be solved by switching the type to integer.. the code now compiles but generates an error regardless as to what is put in.
also i was trying to validate a D.O.B field with a regular expression validator.. but my mind is blow here. im completely lost as, date doesnt seem to exist as a regular expression. any help much appreciated cheers
John Michael Kinsella kinsellajohn@hotmail.com
-
i am using visual studio 2003 primarily i am experiencing difficulties with the range validator.. i am trying to create a range for a password field ! i have the max value set to 12 and the min set to 6 type = string this was generating an error at compile time. i read on another forum that this could be solved by switching the type to integer.. the code now compiles but generates an error regardless as to what is put in.
also i was trying to validate a D.O.B field with a regular expression validator.. but my mind is blow here. im completely lost as, date doesnt seem to exist as a regular expression. any help much appreciated cheers
John Michael Kinsella kinsellajohn@hotmail.com
-
i am using visual studio 2003 primarily i am experiencing difficulties with the range validator.. i am trying to create a range for a password field ! i have the max value set to 12 and the min set to 6 type = string this was generating an error at compile time. i read on another forum that this could be solved by switching the type to integer.. the code now compiles but generates an error regardless as to what is put in.
also i was trying to validate a D.O.B field with a regular expression validator.. but my mind is blow here. im completely lost as, date doesnt seem to exist as a regular expression. any help much appreciated cheers
John Michael Kinsella kinsellajohn@hotmail.com
Hi For your requirement try to use javascript insted of Range Validator as the Range Validator will not Check the Length.Range Validator checks the Value which u entered in the textbox with the Minimum value and MAximum value. In your case you are getting Compile time error because whenever type=string then it checks the ASCII values of the Min value and Max Value(Only first Characters) as you entered min value as 6(ASCII value is 54)which is greater than Max value 1(ASCII Value is 49) so it showing compile time error. So for your requirement you can write a Javascript function to validate that input length.
-
Hi For your requirement try to use javascript insted of Range Validator as the Range Validator will not Check the Length.Range Validator checks the Value which u entered in the textbox with the Minimum value and MAximum value. In your case you are getting Compile time error because whenever type=string then it checks the ASCII values of the Min value and Max Value(Only first Characters) as you entered min value as 6(ASCII value is 54)which is greater than Max value 1(ASCII Value is 49) so it showing compile time error. So for your requirement you can write a Javascript function to validate that input length.
thank you for your suggestion, could you suggest the javascript that i could use as i dont actually have any experience with it.. just a snippet of code that forces a value of between 6 - 12 characters would be greatly appreciated..
John Michael Kinsella kinsellajohn@hotmail.com