This repository was archived by the owner on May 20, 2026. It is now read-only.
Premade Validators implementation #39
Copy link
Copy link
Open
Labels
Description
- Required
- Exclusion - check if value isn't in exclusion list
Number validators
- OddNumber
- EvenNumber
- GreaterThanNumber
- GreaterThanOrEqualToNumber
- EqualToNumber
- LessThanNumber
- LessThanOrEqualToNumber
Implementation of NPM package Validator:
- Contains
- Equals
- Alpha
- Alphanumeric
- Ascii
- Base64
- Boolean
- ByteLength
- CreditCard
- Currency
- DataURI - check if the string is a data uri format
- Decimal - check if the string is decimal
- DivisibleBy - check if the string is a number that's divisible by another
- EmptyString
- FQDN - check if the string is a fully qualified domain name (e.g. domain.com)
- Float - check if the string is a float.
- FullWidth - check if the string contains any full-width chars.
- HalfWidth - check if the string contains any half-width chars.
- HexColor
- Hexadecimal
- IP - check if the string is an IP (version 4 or 6).
- ISBN - check if the string is an ISBN (version 10 or 13).
- ISSN - check if the string is an ISSN.
- ISIN - check if the string is an ISIN
- ISO8601 - check if the string is a valid ISO 8601 date
- Inclusion - check if the string is in a array of allowed values
- Int
- JSON - check if the string is valid JSON (note: uses JSON.parse)
- Length - check if the string's length falls in a range
- Lowercase
- MACAdress
- MD5
- MobilePhone
Mongold - Multibyte
- Numeric
- SurrogatePair
- URL
- UUID
- Uppercase
- VariableWidth
- Whitelisted - checks characters if they appear in the whitelist.
- Matches (Regex)
Other:
- DebounceValidator
Reactions are currently unavailable
Activity
MartynasZilinskas commentedon May 10, 2017
I wrote down all validators that could be included in this package. But not all of them should be included. We need to cross out some of them @DovydasNavickas @GiedriusGrabauskas.