Displaying page
of
pages;
Items to
|
Title |
Test
Details
To validate the File Type for a FileUploader
|
|
Expression |
^(([a-zA-Z]:)|(\\{2}\w+)\$?)(\\(\w[\w].*))+(.pdf)$
|
|
Description |
You can use this to check the valid file type you have given to the last in the expression
like
^(([a-zA-Z]:)|(\\{2}\w+)\$?)(\\(\w[\w].*))+(.pdf)$
This will accept .pdf only
OR
^(([a-zA-Z]:)|(\\{2}\w+)\$?)(\\(\w[\w].*))+((.pdf)|(.doc))$
This will accept .pdf and .doc
OR
^(([a-zA-Z]:)|(\\{2}\w+)\$?)(\\(\w[\w].*))+((.pdf)|(.doc)|(.txt))$
This will accept .pdf , .doc and .txt
|
|
Matches |
C:\Documents and Settings\chandan.kumar\Desktop\1004.pdf
|
|
Non-Matches |
C:\Documents and Settings\All Users\Documents\My Pictures\Sample Pictures\Sunset.jpg
|
|
Author |
Rating:
Chandan Kumar
|
|
Title |
Test
Details
DECIMAL CHECK (Max 2 digit after Decimal )
|
|
Expression |
^\d+(?:\.\d{0,2})?$
|
|
Description |
This will validatet the Number for Max Tow decimal place after a number.. it will validate like 12, 12.1, 12.23; but it will invalidate 12.326
|
|
Matches |
100,100.1,100.11
|
|
Non-Matches |
100.123 , 100.1234
|
|
Author |
Rating:
Chandan Kumar
|
|
Title |
Test
Details
Define Maximum length to a TextBox
|
|
Expression |
^(.|\r|\n){1,10}$
|
|
Description |
This expression can be use to define the maximum length to a textBox.
U can change the maximum character by replacing the last numeric value that is 10 in my example.
Just change this number to your desired number like
^(.|\r|\n){1,10}$ : for max 10 character
^(.|\r|\n){1,20}$ : for max 20 character
|
|
Matches |
ChandanKum
|
|
Non-Matches |
ChandanKuma
|
|
Author |
Rating:
Chandan Kumar
|
|
Title |
Test
Details
Email validation
|
|
Expression |
\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*
|
|
Description |
To validate an Email ID
|
|
Matches |
chandanalways@gmail.com
|
|
Non-Matches |
chandanalways@gmail..com
|
|
Author |
Rating:
Chandan Kumar
|
Displaying page
of
pages;
Items to