0

Hi every one,

I have a text field called control. This field should allow the following kind of values.

             1) 1.2.3;4              : a) If I give some other value I should show error 
             2) 1.2.1_a.te.st_;6     : b) Here when I enter '_' then its mandatory to  enter some char or no's next to '_'. For second '_' its not necessary to enteranything.
                                       c) Need to block continous two dot like this(1.2.3...1;5)   

Which means I need to check the validation after second dot (.) to (;) I can enter dot(.),char, no's , '_' and want to apply the mentioned conditions(b) also.

I tried out this reg exp but I don't know how to add conditions in that. Can anyone tell me how to do this validation?

/[0-9]{1,}.[0-9]{1,}.[0-9a-zA-Z._']{1,};[0-9a-zA-Z]{1,}/g;

Thanks in advance,

Edited by sasikrishnasamy

2
Contributors
1
Reply
11
Views
2 Years
Discussion Span
Last Post by stbuchok
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.