Class Validation
Validation Class. Used for validation of model data
Offers different validation methods.
Constants
- 
          
          stringDEFAULT_LOCALE ¶'en_US'Default locale 
Property Summary
Method Summary
- 
          _check() protected staticRuns a regular expression match. 
- 
          _getDateString() protected staticConverts an array representing a date or datetime into a ISO string. The arrays are typically sent for validation from a form generated by the CakePHP FormHelper. 
- 
          _populateIp() protected staticLazily populate the IP address patterns used for validations 
- 
          _reset() protected staticReset internal variables for another validation run. 
- 
          alphaNumeric() public staticChecks that a string contains only integer or letters 
- 
          ascii() public staticCheck that the input value is within the ascii byte range. 
- 
          blank() public static deprecatedReturns true if field is left blank -OR- only whitespace characters are present in its value Whitespace characters include Space, Tab, Carriage Return, Newline 
- 
          boolean() public staticValidates if passed value is boolean-like. 
- 
          cc() public staticValidation of credit card numbers. Returns true if $check is in the proper credit card format. 
- 
          compareWith() public staticCompare one field to another. 
- 
          comparison() public staticUsed to compare 2 numeric values. 
- 
          containsNonAlphaNumeric() public staticChecks if a string contains one or more non-alphanumeric characters. 
- 
          custom() public staticUsed when a custom regular expression is needed. 
- 
          date() public staticDate validation, determines if the string passed is a valid date. keys that expect full month, day and year will validate leap years. 
- 
          datetime() public staticValidates a datetime value 
- 
          decimal() public staticChecks that a value is a valid decimal. Both the sign and exponent are optional. 
- 
          email() public staticValidates for an email address. 
- 
          equalTo() public staticChecks that value is exactly $comparedTo. 
- 
          extension() public staticChecks that value has a valid file extension. 
- 
          falsey() public staticValidates if given value is falsey. 
- 
          fileSize() public staticChecks the filesize 
- 
          geoCoordinate() public staticValidates a geographic coordinate. 
- 
          getFilename() protected staticHelper for reading the file out of the various file implementations we accept. 
- 
          hexColor() public staticCheck that the input value is a 6 digits hex color. 
- 
          imageHeight() public staticValidates the image width. 
- 
          imageSize() public staticValidates the size of an uploaded image. 
- 
          imageWidth() public staticValidates the image width. 
- 
          inList() public staticChecks if a value is in a given list. Comparison is case sensitive by default. 
- 
          ip() public staticValidation of an IP address. 
- 
          isArray() public staticCheck that the input value is an array. 
- 
          isInteger() public staticCheck that the input value is an integer 
- 
          isScalar() public staticCheck that the input value is a scalar. 
- 
          latitude() public staticConvenience method for latitude validation. 
- 
          lengthBetween() public staticChecks that a string length is within specified range. Spaces are included in the character count. Returns true if string matches value min, max, or between min and max, 
- 
          localizedTime() public staticDate and/or time string validation. Uses I18n::Timeto parse the date. This means parsing is locale dependent.
- 
          longitude() public staticConvenience method for longitude validation. 
- 
          luhn() public staticLuhn algorithm 
- 
          maxLength() public staticChecks whether the length of a string (in characters) is smaller or equal to a maximal length. 
- 
          maxLengthBytes() public staticChecks whether the length of a string (in bytes) is smaller or equal to a maximal length. 
- 
          mimeType() public staticChecks the mime type of a file. 
- 
          minLength() public staticChecks whether the length of a string (in characters) is greater or equal to a minimal length. 
- 
          minLengthBytes() public staticChecks whether the length of a string (in bytes) is greater or equal to a minimal length. 
- 
          money() public staticChecks that a value is a monetary amount. 
- 
          multiple() public staticValidates a multiple select. Comparison is case sensitive by default. 
- 
          naturalNumber() public staticChecks if a value is a natural number. 
- 
          notBlank() public staticChecks that a string contains something other than whitespace 
- 
          notEmpty() public static deprecatedBackwards compatibility wrapper for Validation::notBlank(). 
- 
          numElements() public staticUsed to check the count of a given value of type array or Countable. 
- 
          numeric() public staticChecks if a value is numeric. 
- 
          range() public staticValidates that a number is in specified range. 
- 
          time() public staticTime validation, determines if the string passed is a valid time. Validates time as 24hr (HH:MM) or am/pm ([H]H:MM[a|p]m) Does not allow/validate seconds. 
- 
          truthy() public staticValidates if given value is truthy. 
- 
          uploadError() public staticChecking for upload errors 
- 
          uploadedFile() public staticValidate an uploaded file. 
- 
          url() public staticChecks that a value is a valid URL according to https://www.w3.org/Addressing/URL/url-spec.txt 
- 
          userDefined() public static deprecatedRuns an user-defined validation. 
- 
          utf8() public staticCheck that the input value is a utf8 string. 
- 
          uuid() public staticChecks that a value is a valid UUID - https://tools.ietf.org/html/rfc4122 
Method Detail
_check() ¶ protected static
_check(string $check, string $regex): boolRuns a regular expression match.
Parameters
- 
                string$check
- Value to check against the $regex expression 
- 
                string$regex
- Regular expression 
Returns
boolSuccess of match
_getDateString() ¶ protected static
_getDateString(array $value): stringConverts an array representing a date or datetime into a ISO string. The arrays are typically sent for validation from a form generated by the CakePHP FormHelper.
Parameters
- 
                array$value
- The array representing a date or datetime. 
Returns
string_populateIp() ¶ protected static
_populateIp(): voidLazily populate the IP address patterns used for validations
Returns
void_reset() ¶ protected static
_reset(): voidReset internal variables for another validation run.
Returns
voidalphaNumeric() ¶ public static
alphaNumeric(string $check): boolChecks that a string contains only integer or letters
Returns true if string contains only integer or letters
Parameters
- 
                string$check
- Value to check 
Returns
boolSuccess
ascii() ¶ public static
ascii(string $value): boolCheck that the input value is within the ascii byte range.
This method will reject all non-string values.
Parameters
- 
                string$value
- The value to check 
Returns
boolblank() ¶ public static
blank(string $check): boolReturns true if field is left blank -OR- only whitespace characters are present in its value Whitespace characters include Space, Tab, Carriage Return, Newline
Parameters
- 
                string$check
- Value to check 
Returns
boolSuccess
boolean() ¶ public static
boolean(bool|int|string $check, array $booleanValues = []): boolValidates if passed value is boolean-like.
The list of what is considered to be boolean values, may be set via $booleanValues.
Parameters
- 
                bool|int|string$check
- Value to check. 
- 
                array$booleanValues optional
- List of valid boolean values, defaults to - [true, false, 0, 1, '0', '1'].
Returns
boolSuccess.
cc() ¶ public static
cc(string $check, string|array $type = 'fast', bool $deep = false, string|null $regex = null): boolValidation of credit card numbers. Returns true if $check is in the proper credit card format.
Parameters
- 
                string$check
- credit card number to validate 
- 
                string|array$type optional
- 'all' may be passed as a string, defaults to fast which checks format of most major credit cards if an array is used only the values of the array are checked. Example: ['amex', 'bankcard', 'maestro'] 
- 
                bool$deep optional
- set to true this will check the Luhn algorithm of the credit card. 
- 
                string|null$regex optional
- A custom regex can also be passed, this will be used instead of the defined regex values 
Returns
boolSuccess
See Also
compareWith() ¶ public static
compareWith(mixed $check, string $field, array $context): boolCompare one field to another.
If both fields have exactly the same value this method will return true.
Parameters
- 
                mixed$check
- The value to find in $field. 
- 
                string$field
- The field to check $check against. This field must be present in $context. 
- 
                array$context
- The validation context. 
Returns
boolcomparison() ¶ public static
comparison(string $check1, string $operator, int $check2): boolUsed to compare 2 numeric values.
Parameters
- 
                string$check1
- The left value to compare. 
- 
                string$operator
- Can be either a word or operand is greater >, is less <, greater or equal >= less or equal <=, is less <, equal to ==, not equal != 
- 
                int$check2
- The right value to compare. 
Returns
boolSuccess
containsNonAlphaNumeric() ¶ public static
containsNonAlphaNumeric(string $check, int $count = 1): boolChecks if a string contains one or more non-alphanumeric characters.
Returns true if string contains at least the specified number of non-alphanumeric characters
Parameters
- 
                string$check
- Value to check 
- 
                int$count optional
- Number of non-alphanumerics to check for 
Returns
boolSuccess
custom() ¶ public static
custom(string $check, string|null $regex = null): boolUsed when a custom regular expression is needed.
Parameters
- 
                string$check
- The value to check. 
- 
                string|null$regex optional
- If $check is passed as a string, $regex must also be set to valid regular expression 
Returns
boolSuccess
date() ¶ public static
date(string|DateTimeInterface $check, string|array $format = 'ymd', string|null $regex = null): boolDate validation, determines if the string passed is a valid date. keys that expect full month, day and year will validate leap years.
Years are valid from 1800 to 2999.
Formats:
- dmy27-12-2006 or 27-12-06 separators can be a space, period, dash, forward slash
- mdy12-27-2006 or 12-27-06 separators can be a space, period, dash, forward slash
- ymd2006-12-27 or 06-12-27 separators can be a space, period, dash, forward slash
- dMy27 December 2006 or 27 Dec 2006
- MdyDecember 27, 2006 or Dec 27, 2006 comma is optional
- MyDecember 2006 or Dec 2006
- my12/2006 or 12/06 separators can be a space, period, dash, forward slash
- ym2006/12 or 06/12 separators can be a space, period, dash, forward slash
- y2006 just the year without any separators
Parameters
- 
                string|DateTimeInterface$check
- a valid date string/object 
- 
                string|array$format optional
- Use a string or an array of the keys above. Arrays should be passed as ['dmy', 'mdy', etc] 
- 
                string|null$regex optional
- If a custom regular expression is used this is the only validation that will occur. 
Returns
boolSuccess
datetime() ¶ public static
datetime(string|DateTimeInterface $check, string|array $dateFormat = 'ymd', string|null $regex = null): boolValidates a datetime value
All values matching the "date" core validation rule, and the "time" one will be valid
Parameters
- 
                string|DateTimeInterface$check
- Value to check 
- 
                string|array$dateFormat optional
- Format of the date part. See Validation::date() for more information. 
- 
                string|null$regex optional
- Regex for the date part. If a custom regular expression is used this is the only validation that will occur. 
Returns
boolTrue if the value is valid, false otherwise
See Also
\Cake\Validation\Validation::time()
decimal() ¶ public static
decimal(float $check, int|bool|null $places = null, string|null $regex = null): boolChecks that a value is a valid decimal. Both the sign and exponent are optional.
Valid Places:
- null => Any number of decimal places, including none. The '.' is not required.
- true => Any number of decimal places greater than 0, or a float|double. The '.' is required.
- 1..N => Exactly that many number of decimal places. The '.' is required.
Parameters
- 
                float$check
- The value the test for decimal. 
- 
                int|bool|null$places optional
- Decimal places. 
- 
                string|null$regex optional
- If a custom regular expression is used, this is the only validation that will occur. 
Returns
boolSuccess
email() ¶ public static
email(string $check, bool $deep = false, string|null $regex = null): boolValidates for an email address.
Only uses getmxrr() checking for deep validation, or any PHP version on a non-windows distribution
Parameters
- 
                string$check
- Value to check 
- 
                bool$deep optional
- Perform a deeper validation (if true), by also checking availability of host 
- 
                string|null$regex optional
- Regex to use (if none it will use built in regex) 
Returns
boolSuccess
equalTo() ¶ public static
equalTo(mixed $check, mixed $comparedTo): boolChecks that value is exactly $comparedTo.
Parameters
- 
                mixed$check
- Value to check 
- 
                mixed$comparedTo
- Value to compare 
Returns
boolSuccess
extension() ¶ public static
extension(string|array $check, array $extensions = ['gif', 'jpeg', 'png', 'jpg']): boolChecks that value has a valid file extension.
Parameters
- 
                string|array$check
- Value to check 
- 
                array$extensions optional
- file extensions to allow. By default extensions are 'gif', 'jpeg', 'png', 'jpg' 
Returns
boolSuccess
falsey() ¶ public static
falsey(bool|int|string $check, array $falseyValues = []): boolValidates if given value is falsey.
The list of what is considered to be falsey values, may be set via $falseyValues.
Parameters
- 
                bool|int|string$check
- Value to check. 
- 
                array$falseyValues optional
- List of valid falsey values, defaults to - [false, 0, '0'].
Returns
boolSuccess.
fileSize() ¶ public static
fileSize(string|array|Psr\Http\Message\UploadedFileInterface $check, string|null $operator = null, int|string|null $size = null): boolChecks the filesize
Will check the filesize of files/UploadedFileInterface instances by checking the filesize() on disk and not relying on the length reported by the client.
Parameters
- 
                string|array|Psr\Http\Message\UploadedFileInterface$check
- Value to check. 
- 
                string|null$operator optional
- See - Validation::comparison().
- 
                int|string|null$size optional
- Size in bytes or human readable string like '5MB'. 
Returns
boolSuccess
geoCoordinate() ¶ public static
geoCoordinate(string $value, array $options = []): boolValidates a geographic coordinate.
Supported formats:
- <latitude>, <longitude>Example:- -25.274398, 133.775136
Options
- type- A string of the coordinate format, right now only- latLong.
- format- By default- both, can be- longand- latas well to validate only a part of the coordinate.
Parameters
- 
                string$value
- Geographic location as string 
- 
                array$options optional
- Options for the validation logic. 
Returns
boolgetFilename() ¶ protected static
getFilename(string|array|Psr\Http\Message\UploadedFileInterface $check): string|boolHelper for reading the file out of the various file implementations we accept.
Parameters
- 
                string|array|Psr\Http\Message\UploadedFileInterface$check
- The data to read a filename out of. 
Returns
string|boolEither the filename or false on failure.
hexColor() ¶ public static
hexColor(string|array $check): boolCheck that the input value is a 6 digits hex color.
Parameters
- 
                string|array$check
- The value to check 
Returns
boolSuccess
imageHeight() ¶ public static
imageHeight(array $file, string $operator, int $height): boolValidates the image width.
Parameters
- 
                array$file
- The uploaded file data from PHP. 
- 
                string$operator
- Comparision operator. 
- 
                int$height
- Min or max width. 
Returns
boolimageSize() ¶ public static
imageSize(array $file, array $options): boolValidates the size of an uploaded image.
Parameters
- 
                array$file
- The uploaded file data from PHP. 
- 
                array$options
- Options to validate width and height. 
Returns
boolimageWidth() ¶ public static
imageWidth(array $file, string $operator, int $width): boolValidates the image width.
Parameters
- 
                array$file
- The uploaded file data from PHP. 
- 
                string$operator
- Comparision operator. 
- 
                int$width
- Min or max width. 
Returns
boolinList() ¶ public static
inList(string $check, array $list, bool $caseInsensitive = false): boolChecks if a value is in a given list. Comparison is case sensitive by default.
Parameters
- 
                string$check
- Value to check. 
- 
                array$list
- List to check against. 
- 
                bool$caseInsensitive optional
- Set to true for case insensitive comparison. 
Returns
boolSuccess.
ip() ¶ public static
ip(string $check, string $type = 'both'): boolValidation of an IP address.
Parameters
- 
                string$check
- The string to test. 
- 
                string$type optional
- The IP Protocol version to validate against 
Returns
boolSuccess
isArray() ¶ public static
isArray(array $value): boolCheck that the input value is an array.
Parameters
- 
                array$value
- The value to check 
Returns
boolisInteger() ¶ public static
isInteger(string $value): boolCheck that the input value is an integer
This method will accept strings that contain only integer data as well.
Parameters
- 
                string$value
- The value to check 
Returns
boolisScalar() ¶ public static
isScalar(mixed $value): boolCheck that the input value is a scalar.
This method will accept integers, floats, strings and booleans, but not accept arrays, objects, resources and nulls.
Parameters
- 
                mixed$value
- The value to check 
Returns
boollatitude() ¶ public static
latitude(string $value, array $options = []): boolConvenience method for latitude validation.
Parameters
- 
                string$value
- Latitude as string 
- 
                array$options optional
- Options for the validation logic. 
Returns
boolSee Also
Links
lengthBetween() ¶ public static
lengthBetween(string $check, int $min, int $max): boolChecks that a string length is within specified range. Spaces are included in the character count. Returns true if string matches value min, max, or between min and max,
Parameters
- 
                string$check
- Value to check for length 
- 
                int$min
- Minimum value in range (inclusive) 
- 
                int$max
- Maximum value in range (inclusive) 
Returns
boolSuccess
localizedTime() ¶ public static
localizedTime(string|DateTime $check, string $type = 'datetime', string|int|null $format = null): boolDate and/or time string validation.
Uses I18n::Time to parse the date. This means parsing is locale dependent.
Parameters
- 
                string|DateTime$check
- a date string or object (will always pass) 
- 
                string$type optional
- Parser type, one out of 'date', 'time', and 'datetime' 
- 
                string|int|null$format optional
- any format accepted by IntlDateFormatter 
Returns
boolSuccess
Throws
InvalidArgumentExceptionwhen unsupported $type given
See Also
longitude() ¶ public static
longitude(string $value, array $options = []): boolConvenience method for longitude validation.
Parameters
- 
                string$value
- Latitude as string 
- 
                array$options optional
- Options for the validation logic. 
Returns
boolSee Also
Links
luhn() ¶ public static
luhn(string|array $check): boolLuhn algorithm
Parameters
- 
                string|array$check
- Value to check. 
Returns
boolSuccess
See Also
maxLength() ¶ public static
maxLength(string $check, int $max): boolChecks whether the length of a string (in characters) is smaller or equal to a maximal length.
Parameters
- 
                string$check
- The string to test 
- 
                int$max
- The maximal string length 
Returns
boolSuccess
maxLengthBytes() ¶ public static
maxLengthBytes(string $check, int $max): boolChecks whether the length of a string (in bytes) is smaller or equal to a maximal length.
Parameters
- 
                string$check
- The string to test 
- 
                int$max
- The maximal string length 
Returns
boolSuccess
mimeType() ¶ public static
mimeType(string|array|Psr\Http\Message\UploadedFileInterface $check, array|string $mimeTypes = []): boolChecks the mime type of a file.
Will check the mimetype of files/UploadedFileInterface instances by checking the using finfo on the file, not relying on the content-type sent by the client.
Parameters
- 
                string|array|Psr\Http\Message\UploadedFileInterface$check
- Value to check. 
- 
                array|string$mimeTypes optional
- Array of mime types or regex pattern to check. 
Returns
boolSuccess
Throws
RuntimeExceptionwhen mime type can not be determined.
LogicExceptionwhen ext/fileinfo is missing
minLength() ¶ public static
minLength(string $check, int $min): boolChecks whether the length of a string (in characters) is greater or equal to a minimal length.
Parameters
- 
                string$check
- The string to test 
- 
                int$min
- The minimal string length 
Returns
boolSuccess
minLengthBytes() ¶ public static
minLengthBytes(string $check, int $min): boolChecks whether the length of a string (in bytes) is greater or equal to a minimal length.
Parameters
- 
                string$check
- The string to test 
- 
                int$min
- The minimal string length (in bytes) 
Returns
boolSuccess
money() ¶ public static
money(string $check, string $symbolPosition = 'left'): boolChecks that a value is a monetary amount.
Parameters
- 
                string$check
- Value to check 
- 
                string$symbolPosition optional
- Where symbol is located (left/right) 
Returns
boolSuccess
multiple() ¶ public static
multiple(array $check, array $options = [], bool $caseInsensitive = false): boolValidates a multiple select. Comparison is case sensitive by default.
Valid Options
- in => provide a list of choices that selections must be made from
- max => maximum number of non-zero choices that can be made
- min => minimum number of non-zero choices that can be made
Parameters
- 
                array$check
- Value to check 
- 
                array$options optional
- Options for the check. 
- 
                bool$caseInsensitive optional
- Set to true for case insensitive comparison. 
Returns
boolSuccess
naturalNumber() ¶ public static
naturalNumber(string $check, bool $allowZero = false): boolChecks if a value is a natural number.
Parameters
- 
                string$check
- Value to check 
- 
                bool$allowZero optional
- Set true to allow zero, defaults to false 
Returns
boolSuccess
See Also
notBlank() ¶ public static
notBlank(string $check): boolChecks that a string contains something other than whitespace
Returns true if string contains something other than whitespace
Parameters
- 
                string$check
- Value to check 
Returns
boolSuccess
notEmpty() ¶ public static
notEmpty(string $check): boolBackwards compatibility wrapper for Validation::notBlank().
Parameters
- 
                string$check
- Value to check. 
Returns
boolSuccess.
See Also
numElements() ¶ public static
numElements(array|Countable $check, string $operator, int $expectedCount): boolUsed to check the count of a given value of type array or Countable.
Parameters
- 
                array|Countable$check
- The value to check the count on. 
- 
                string$operator
- Can be either a word or operand is greater >, is less <, greater or equal >= less or equal <=, is less <, equal to ==, not equal != 
- 
                int$expectedCount
- The expected count value. 
Returns
boolSuccess
numeric() ¶ public static
numeric(string $check): boolChecks if a value is numeric.
Parameters
- 
                string$check
- Value to check 
Returns
boolSuccess
range() ¶ public static
range(string $check, int|float|null $lower = null, int|float|null $upper = null): boolValidates that a number is in specified range.
If $lower and $upper are set, the range is inclusive. If they are not set, will return true if $check is a legal finite on this platform.
Parameters
- 
                string$check
- Value to check 
- 
                int|float|null$lower optional
- Lower limit 
- 
                int|float|null$upper optional
- Upper limit 
Returns
boolSuccess
time() ¶ public static
time(string|DateTimeInterface $check): boolTime validation, determines if the string passed is a valid time. Validates time as 24hr (HH:MM) or am/pm ([H]H:MM[a|p]m) Does not allow/validate seconds.
Parameters
- 
                string|DateTimeInterface$check
- a valid time string/object 
Returns
boolSuccess
truthy() ¶ public static
truthy(bool|int|string $check, array $truthyValues = []): boolValidates if given value is truthy.
The list of what is considered to be truthy values, may be set via $truthyValues.
Parameters
- 
                bool|int|string$check
- Value to check. 
- 
                array$truthyValues optional
- List of valid truthy values, defaults to - [true, 1, '1'].
Returns
boolSuccess.
uploadError() ¶ public static
uploadError(string|array|Psr\Http\Message\UploadedFileInterface $check, bool $allowNoFile = false): boolChecking for upload errors
Parameters
- 
                string|array|Psr\Http\Message\UploadedFileInterface$check
- Value to check. 
- 
                bool$allowNoFile optional
- Set to true to allow UPLOAD_ERR_NO_FILE as a pass. 
Returns
boolSee Also
uploadedFile() ¶ public static
uploadedFile(array $file, array $options = []): boolValidate an uploaded file.
Helps join uploadError, fileSize and mimeType into
one higher level validation method.
Options
- types- An array of valid mime types. If empty all types will be accepted. The- typewill not be looked at, instead the file type will be checked with ext/finfo.
- minSize- The minimum file size in bytes. Defaults to not checking.
- maxSize- The maximum file size in bytes. Defaults to not checking.
- optional- Whether or not this file is optional. Defaults to false. If true a missing file will pass the validator regardless of other constraints.
Parameters
- 
                array$file
- The uploaded file data from PHP. 
- 
                array$options optional
- An array of options for the validation. 
Returns
boolurl() ¶ public static
url(string $check, bool $strict = false): boolChecks that a value is a valid URL according to https://www.w3.org/Addressing/URL/url-spec.txt
The regex checks for the following component parts:
- a valid, optional, scheme
- a valid ip address OR a valid domain name as defined by section 2.3.1 of https://www.ietf.org/rfc/rfc1035.txt with an optional port number
- an optional valid path
- an optional query string (get parameters)
- an optional fragment (anchor tag) as defined in RFC 3986
Parameters
- 
                string$check
- Value to check 
- 
                bool$strict optional
- Require URL to be prefixed by a valid scheme (one of http(s)/ftp(s)/file/news/gopher) 
Returns
boolSuccess
Links
userDefined() ¶ public static
userDefined(string|array $check, object $object, string $method, array|null $args = null): mixedRuns an user-defined validation.
Parameters
- 
                string|array$check
- value that will be validated in user-defined methods. 
- 
                object$object
- class that holds validation method 
- 
                string$method
- class method name for validation to run 
- 
                array|null$args optional
- arguments to send to method 
Returns
mixeduser-defined class class method returns
utf8() ¶ public static
utf8(string $value, array $options = []): boolCheck that the input value is a utf8 string.
This method will reject all non-string values.
Options
- extended- Disallow bytes higher within the basic multilingual plane. MySQL's older utf8 encoding type does not allow characters above the basic multilingual plane. Defaults to false.
Parameters
- 
                string$value
- The value to check 
- 
                array$options optional
- An array of options. See above for the supported options. 
Returns
booluuid() ¶ public static
uuid(string $check): boolChecks that a value is a valid UUID - https://tools.ietf.org/html/rfc4122
Parameters
- 
                string$check
- Value to check 
Returns
boolSuccess
