Skip to content
This repository was archived by the owner on May 20, 2026. It is now read-only.
This repository was archived by the owner on May 20, 2026. It is now read-only.

Premade Validators implementation #39

Description

@MartynasZilinskas
  • 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
  • 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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions