Displaying page
of
pages;
Items to
Title |
Test
Details
Limited Number of Digits with 0 or 2 Decimal Places
|
Expression |
^[-]?\d{1,10}\.?([0-9][0-9])?$
|
Description |
Limits the max number of digits before the decimal point to 10; if decimal point is entered, requires entry of 2 decimal places. Allows for an optional negative sign. This pattern was derived to meet the maximum number of digits that can be stored in a decimal data type in SQL Server 2005, and allows for the way SQL Server appends the decimal places. The column in the table is defined as decimal(12,2).
|
Matches |
2345678901.09 | -2345678901.09
|
Non-Matches |
2345678901.0 | -2345678901.9 | -23456789012 | 23456789012
|
Author |
Rating:
Not yet rated.
C. Yon
|
Displaying page
of
pages;
Items to