A validator class to expose method to validate various numbers such as Mobile, PAN, UPI id
Open
#121
0 comments
0 reactions
1 assignee
Assigned to @WuOf2GFw5mKoAG6mKIuUGHt35CJmh5PzkiEC931
View on GitHub
enhancement
- Dominant language
- TypeScript
- Stars
- 5
- Forks
- 10
- PR merge metrics
- No merged PRs in 30d
Description
`export class Validator {
static mobile(value: string): boolean {
return /^[6789]\d{9}$/.test(value);
}
static pincode(value: string | number): boolean {
return /^[1-9]\d{5}$/.test(value as string);
}
static pan(value: string): boolean {
return /^[A-Z]{3}[PCHABGJLFTE][A-Z]\d{4}[A-Z]$/i.test(value);
}
}`
Something like this, found on Github
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.