i have a textbox want to do the validation checking.
either it is "F" only or "F12345678", 8 digits after the "F"
for "F" only: (F|f)\d{0}
for "F12345678": (F|f)\d{8}
how to combine it? i cannot accept 1-7 digits after the "F"
I think you need to write custom validator. using custom validator we can check if the entered value in the text box was as per the requirment or not...
thanks,
siva kumar goru
I think you need to write custom validator
What; s wrong with a RegularExpressionValidator?
Hi,
Please use the following Reg ex:
^([fF])\d{8}$
Which accepts 8 digits after "f" or "F"
Hope this helps!
Thanks!
thank, how about if only F without any digit?
i want to make it accept 2 condition:
(1) after F must 8 digit
(2) it allow only F without any digit
Hi ccs2090,
Try to put following expression in ValidationExpression property of your RegularExpressionValidator.
[Ff]{1}[0-9]{8}|[Ff]
Let me know if it works for you.
shiningstar
Hi ccs2090,
Try to put following expression in ValidationExpression property of your RegularExpressionValidator.
[Ff]{1}[0-9]{8}|[Ff]Let me know if it works for you.
thank you so much.it really work.
it cheer my day~ ^^
沒有留言:
張貼留言