You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+3Lines changed: 3 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -36,9 +36,12 @@ Built in rules are:
36
36
-`integer`
37
37
-`decimal`
38
38
-`money`
39
+
-`length`
39
40
40
41
Decimal can be configured using arguments. e.g `decimal(1,2)` to ensure that (if a decimal point is given) then 1 to 2 digits follow it. `money` allows up to 2 decimal places, any more and it will be invalid.
41
42
43
+
Length can be configured using arguments. e.g `length(1, 100)` ensures a min length of 1 and max length of 100 characters. You can exclude either parameter to check only the min OR max, for example `length(,100)` ensures a max length of 100 characters.
test(`should validate "${value}" as ${expectedError ? 'a valid': 'an invalid'} length when size should be in the bounds (${minLength},${maxLength})`,async()=>{
0 commit comments