Validators
A collection of validators for common data types
isEmail
Check if any given value is a valid email address.
isNumber
Check if any given value is a valid number.
isUrl
Check if any given value is a valid URL.
isEmpty
Check if any given string, array or object is empty.
isUuid
Check if any given value is a valid UUID.
isJson
Check if any given value is a valid JSON string.
isObject
Check if any given value is an object.
isArray
Check if any given value is an array.
isHex
Check if any given value is a valid hexadecimal color code.
::page-function{name="isAlphabetic" description="Check if any given value contains only alphabetic characters." params=" value: string | number | string | number " }
::
isAlphanumeric
Check if any given value contains only alphanumeric characters.
isBoolean
Check if any given value is a boolean value.
isUndefined
Check if any given value is undefined.
isNull
Check if any given value is null.
::page-function{name="isDate" description="Check if any given value is a valid Date object." params=" value: Date | string | number | string | number " }
::
isTime
Check if any given value is a valid time in HH:mm format.
isLeapYear
Check if any given value year is a leap year.
isEven
Check if the number is even.
isOdd
Check if the number is odd.
isPositive
Check if the number is positive.
isNegative
Check if the number is negative.
isZero
Check if the number is zero.
isOver9000
Check if the number is over 9000.
isPrime
Check if the number is a prime number.
isInteger
Check if the number is an integer.
isFloat
Check if the number is a float.
isBetween
Check if the number is between the specified range.
isDivisibleBy
Check if the number is divisible by the specified number.
isCreditCard
Check if any given value is a valid credit card number.
isLatLng
Check if any given value is a valid latitude-longitude coordinate in the format lat,lng or lat,lng.
isLatitude
Check if any given value is a valid latitude coordinate.
isLongitude
Check if any given value is a valid longitude coordinate.
isIpAddress
Check if any given value is a valid IP address.
isPort
Check if any given value is a valid port number.
isMacAddress
Check if any given value is a valid MAC address.