Displaying page
of
pages;
Items to
Title |
Test
Details
Special Character Blocker
|
Expression |
[^<>/?&{};#]+
|
Description |
This expression stops the characters <>/?&{};# from a string of any length passing the regular expression validator in Visual Studio thereby stopping the HttpRequestValidationException (if client side validation and javascript is on)
|
Matches |
any word | a | a number 4382
|
Non-Matches |
< | > | / | ? | & | # | { | } | ;
|
Author |
Rating:
Not yet rated.
Paul Verhulpen
|
Title |
Test
Details
Fractions / Fractional Odds
|
Expression |
^\d+\/?\d*$
|
Description |
This simple expression is used to validate fractions or UK odds.
It will match integers, allowing 10/1 to be entered as 10, and fractions.
It will not match negative numbers or fractions, spaces or any alphabetical characters.
|
Matches |
10 | 2/3 | 100/30
|
Non-Matches |
-10 | -2/3 | text | 10 / 1 | 42/7eok
|
Author |
Rating:
Not yet rated.
Paul Verhulpen
|
Title |
Test
Details
Non localised currency format
|
Expression |
^(\d?)*(\.\d{1}|\.\d{2})?$
|
Description |
Expression to validate currency formatted numbers without the currency symbol
|
Matches |
153 | 33.48 | 786.1 | 1567863483.33
|
Non-Matches |
-123 | 8524.258 | eo45
|
Author |
Rating:
Paul Verhulpen
|
Title |
Test
Details
24 hour time
|
Expression |
^([0-1]?[0-9]|[2][0-3])[:|.]([0-5][0-9])$
|
Description |
Based on Morten Henriksen's expression, I just added the check for a . as well as a :
|
Matches |
01.00 | 01:00 | 23.59 | 00:00
|
Non-Matches |
2400 | 0100 | 14.75
|
Author |
Rating:
Not yet rated.
Paul Verhulpen
|
Displaying page
of
pages;
Items to