react-forms icon indicating copy to clipboard operation
react-forms copied to clipboard

Premade Validators implementation

Open MartynasZilinskas opened this issue 8 years ago • 1 comments

  • [x] Required
  • [ ] Exclusion - check if value isn't in exclusion list

Number validators

  • [ ] OddNumber
  • [ ] EvenNumber
  • [ ] GreaterThanNumber
  • [ ] GreaterThanOrEqualToNumber
  • [ ] EqualToNumber
  • [ ] LessThanNumber
  • [ ] LessThanOrEqualToNumber

Implementation of NPM package Validator:

  • [x] Contains
  • [ ] Equals
  • [x] Alpha
  • [x] Alphanumeric
  • [x] Ascii
  • [x] Base64
  • [x] Boolean
  • [x] ByteLength
  • [x] CreditCard
  • [x] 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
  • [ ] Email
  • [ ] 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

MartynasZilinskas avatar May 09 '17 18:05 MartynasZilinskas

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.

MartynasZilinskas avatar May 10 '17 14:05 MartynasZilinskas