Skip to content

Commit a06b4e4

Browse files
authored
Update README.md
Updated the readme to be more descriptive.
1 parent 5633506 commit a06b4e4

File tree

1 file changed

+11
-1
lines changed
  • Specialized Areas/Regular Expressions/Check if number has 10 digits

1 file changed

+11
-1
lines changed
Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,11 @@
1-
Script is used to check if the number has 10 digts( you can update the digit count in the code based on the need.
1+
# Digit Length Validator
2+
3+
## Description
4+
5+
This script checks if a string contains exactly a specified number of digits. Useful for validating numeric input. The digit count can be adjusted in the code.
6+
7+
## Usage
8+
To change the required digit count, update the number in the regular expression
9+
```
10+
var digitLengthRegex = /^\d{N}$/; // Replace N with desired digit count
11+
```

0 commit comments

Comments
 (0)