api/laravel/Validation/Concerns/ValidatesAttributes.yaml
2024-09-26 02:03:21 -07:00

2317 lines
46 KiB
YAML

name: ValidatesAttributes
class_comment: null
dependencies:
- name: BigDecimal
type: class
source: Brick\Math\BigDecimal
- name: BigNumber
type: class
source: Brick\Math\BigNumber
- name: BrickMathException
type: class
source: Brick\Math\Exception\MathException
- name: DateTime
type: class
source: DateTime
- name: DateTimeInterface
type: class
source: DateTimeInterface
- name: DateTimeZone
type: class
source: DateTimeZone
- name: EmailValidator
type: class
source: Egulias\EmailValidator\EmailValidator
- name: DNSCheckValidation
type: class
source: Egulias\EmailValidator\Validation\DNSCheckValidation
- name: SpoofCheckValidation
type: class
source: Egulias\EmailValidator\Validation\Extra\SpoofCheckValidation
- name: MultipleValidationWithAnd
type: class
source: Egulias\EmailValidator\Validation\MultipleValidationWithAnd
- name: NoRFCWarningsValidation
type: class
source: Egulias\EmailValidator\Validation\NoRFCWarningsValidation
- name: RFCValidation
type: class
source: Egulias\EmailValidator\Validation\RFCValidation
- name: Exception
type: class
source: Exception
- name: Container
type: class
source: Illuminate\Container\Container
- name: Model
type: class
source: Illuminate\Database\Eloquent\Model
- name: Arr
type: class
source: Illuminate\Support\Arr
- name: MathException
type: class
source: Illuminate\Support\Exceptions\MathException
- name: Date
type: class
source: Illuminate\Support\Facades\Date
- name: Str
type: class
source: Illuminate\Support\Str
- name: Exists
type: class
source: Illuminate\Validation\Rules\Exists
- name: Unique
type: class
source: Illuminate\Validation\Rules\Unique
- name: ValidationData
type: class
source: Illuminate\Validation\ValidationData
- name: InvalidArgumentException
type: class
source: InvalidArgumentException
- name: File
type: class
source: Symfony\Component\HttpFoundation\File\File
- name: UploadedFile
type: class
source: Symfony\Component\HttpFoundation\File\UploadedFile
- name: ValueError
type: class
source: ValueError
properties: []
methods:
- name: validateAccepted
visibility: public
parameters:
- name: attribute
- name: value
comment: '# * Validate that an attribute was "accepted".
# *
# * This validation rule implies the attribute is "required".
# *
# * @param string $attribute
# * @param mixed $value
# * @return bool'
- name: validateAcceptedIf
visibility: public
parameters:
- name: attribute
- name: value
- name: parameters
comment: '# * Validate that an attribute was "accepted" when another attribute has
a given value.
# *
# * @param string $attribute
# * @param mixed $value
# * @param mixed $parameters
# * @return bool'
- name: validateDeclined
visibility: public
parameters:
- name: attribute
- name: value
comment: '# * Validate that an attribute was "declined".
# *
# * This validation rule implies the attribute is "required".
# *
# * @param string $attribute
# * @param mixed $value
# * @return bool'
- name: validateDeclinedIf
visibility: public
parameters:
- name: attribute
- name: value
- name: parameters
comment: '# * Validate that an attribute was "declined" when another attribute has
a given value.
# *
# * @param string $attribute
# * @param mixed $value
# * @param mixed $parameters
# * @return bool'
- name: validateActiveUrl
visibility: public
parameters:
- name: attribute
- name: value
comment: '# * Validate that an attribute is an active URL.
# *
# * @param string $attribute
# * @param mixed $value
# * @return bool'
- name: getDnsRecords
visibility: protected
parameters:
- name: hostname
- name: type
comment: '# * Get the DNS records for the given hostname.
# *
# * @param string $hostname
# * @param int $type
# * @return array|false'
- name: validateAscii
visibility: public
parameters:
- name: attribute
- name: value
comment: '# * Validate that an attribute is 7 bit ASCII.
# *
# * @param string $attribute
# * @param mixed $value
# * @return bool'
- name: validateBail
visibility: public
parameters: []
comment: '# * "Break" on first validation fail.
# *
# * Always returns true, just lets us put "bail" in rules.
# *
# * @return bool'
- name: validateBefore
visibility: public
parameters:
- name: attribute
- name: value
- name: parameters
comment: '# * Validate the date is before a given date.
# *
# * @param string $attribute
# * @param mixed $value
# * @param array<int, int|string> $parameters
# * @return bool'
- name: validateBeforeOrEqual
visibility: public
parameters:
- name: attribute
- name: value
- name: parameters
comment: '# * Validate the date is before or equal a given date.
# *
# * @param string $attribute
# * @param mixed $value
# * @param array<int, int|string> $parameters
# * @return bool'
- name: validateAfter
visibility: public
parameters:
- name: attribute
- name: value
- name: parameters
comment: '# * Validate the date is after a given date.
# *
# * @param string $attribute
# * @param mixed $value
# * @param array<int, int|string> $parameters
# * @return bool'
- name: validateAfterOrEqual
visibility: public
parameters:
- name: attribute
- name: value
- name: parameters
comment: '# * Validate the date is equal or after a given date.
# *
# * @param string $attribute
# * @param mixed $value
# * @param array<int, int|string> $parameters
# * @return bool'
- name: compareDates
visibility: protected
parameters:
- name: attribute
- name: value
- name: parameters
- name: operator
comment: '# * Compare a given date against another using an operator.
# *
# * @param string $attribute
# * @param mixed $value
# * @param array<int, int|string> $parameters
# * @param string $operator
# * @return bool'
- name: getDateFormat
visibility: protected
parameters:
- name: attribute
comment: '# * Get the date format for an attribute if it has one.
# *
# * @param string $attribute
# * @return string|null'
- name: getDateTimestamp
visibility: protected
parameters:
- name: value
comment: '# * Get the date timestamp.
# *
# * @param mixed $value
# * @return int'
- name: checkDateTimeOrder
visibility: protected
parameters:
- name: format
- name: first
- name: second
- name: operator
comment: '# * Given two date/time strings, check that one is after the other.
# *
# * @param string $format
# * @param string $first
# * @param string $second
# * @param string $operator
# * @return bool'
- name: getDateTimeWithOptionalFormat
visibility: protected
parameters:
- name: format
- name: value
comment: '# * Get a DateTime instance from a string.
# *
# * @param string $format
# * @param string $value
# * @return \DateTime|null'
- name: getDateTime
visibility: protected
parameters:
- name: value
comment: '# * Get a DateTime instance from a string with no format.
# *
# * @param string $value
# * @return \DateTime|null'
- name: validateAlpha
visibility: public
parameters:
- name: attribute
- name: value
- name: parameters
comment: '# * Validate that an attribute contains only alphabetic characters.
# * If the ''ascii'' option is passed, validate that an attribute contains only
ascii alphabetic characters.
# *
# * @param string $attribute
# * @param mixed $value
# * @return bool'
- name: validateAlphaDash
visibility: public
parameters:
- name: attribute
- name: value
- name: parameters
comment: '# * Validate that an attribute contains only alpha-numeric characters,
dashes, and underscores.
# * If the ''ascii'' option is passed, validate that an attribute contains only
ascii alpha-numeric characters,
# * dashes, and underscores.
# *
# * @param string $attribute
# * @param mixed $value
# * @return bool'
- name: validateAlphaNum
visibility: public
parameters:
- name: attribute
- name: value
- name: parameters
comment: '# * Validate that an attribute contains only alpha-numeric characters.
# * If the ''ascii'' option is passed, validate that an attribute contains only
ascii alpha-numeric characters.
# *
# * @param string $attribute
# * @param mixed $value
# * @return bool'
- name: validateArray
visibility: public
parameters:
- name: attribute
- name: value
- name: parameters
default: '[]'
comment: '# * Validate that an attribute is an array.
# *
# * @param string $attribute
# * @param mixed $value
# * @param array<int, int|string> $parameters
# * @return bool'
- name: validateList
visibility: public
parameters:
- name: attribute
- name: value
comment: '# * Validate that an attribute is a list.
# *
# * @param string $attribute
# * @param mixed $value
# * @return bool'
- name: validateRequiredArrayKeys
visibility: public
parameters:
- name: attribute
- name: value
- name: parameters
comment: '# * Validate that an array has all of the given keys.
# *
# * @param string $attribute
# * @param mixed $value
# * @param array<int, int|string> $parameters
# * @return bool'
- name: validateBetween
visibility: public
parameters:
- name: attribute
- name: value
- name: parameters
comment: '# * Validate the size of an attribute is between a set of values.
# *
# * @param string $attribute
# * @param mixed $value
# * @param array<int, int|string> $parameters
# * @return bool'
- name: validateBoolean
visibility: public
parameters:
- name: attribute
- name: value
comment: '# * Validate that an attribute is a boolean.
# *
# * @param string $attribute
# * @param mixed $value
# * @return bool'
- name: validateConfirmed
visibility: public
parameters:
- name: attribute
- name: value
comment: '# * Validate that an attribute has a matching confirmation.
# *
# * @param string $attribute
# * @param mixed $value
# * @return bool'
- name: validateContains
visibility: public
parameters:
- name: attribute
- name: value
- name: parameters
comment: '# * Validate an attribute contains a list of values.
# *
# * @param string $attribute
# * @param mixed $value
# * @param array<int, int|string> $parameters
# * @return bool'
- name: validateCurrentPassword
visibility: protected
parameters:
- name: attribute
- name: value
- name: parameters
comment: '# * Validate that the password of the currently authenticated user matches
the given value.
# *
# * @param string $attribute
# * @param mixed $value
# * @param array<int, int|string> $parameters
# * @return bool'
- name: validateDate
visibility: public
parameters:
- name: attribute
- name: value
comment: '# * Validate that an attribute is a valid date.
# *
# * @param string $attribute
# * @param mixed $value
# * @return bool'
- name: validateDateFormat
visibility: public
parameters:
- name: attribute
- name: value
- name: parameters
comment: '# * Validate that an attribute matches a date format.
# *
# * @param string $attribute
# * @param mixed $value
# * @param array<int, int|string> $parameters
# * @return bool'
- name: validateDateEquals
visibility: public
parameters:
- name: attribute
- name: value
- name: parameters
comment: '# * Validate that an attribute is equal to another date.
# *
# * @param string $attribute
# * @param mixed $value
# * @param array<int, int|string> $parameters
# * @return bool'
- name: validateDecimal
visibility: public
parameters:
- name: attribute
- name: value
- name: parameters
comment: '# * Validate that an attribute has a given number of decimal places.
# *
# * @param string $attribute
# * @param mixed $value
# * @param array<int, int|string> $parameters
# * @return bool'
- name: validateDifferent
visibility: public
parameters:
- name: attribute
- name: value
- name: parameters
comment: '# * Validate that an attribute is different from another attribute.
# *
# * @param string $attribute
# * @param mixed $value
# * @param array<int, int|string> $parameters
# * @return bool'
- name: validateDigits
visibility: public
parameters:
- name: attribute
- name: value
- name: parameters
comment: '# * Validate that an attribute has a given number of digits.
# *
# * @param string $attribute
# * @param mixed $value
# * @param array<int, int|string> $parameters
# * @return bool'
- name: validateDigitsBetween
visibility: public
parameters:
- name: attribute
- name: value
- name: parameters
comment: '# * Validate that an attribute is between a given number of digits.
# *
# * @param string $attribute
# * @param mixed $value
# * @param array<int, int|string> $parameters
# * @return bool'
- name: validateDimensions
visibility: public
parameters:
- name: attribute
- name: value
- name: parameters
comment: '# * Validate the dimensions of an image matches the given values.
# *
# * @param string $attribute
# * @param mixed $value
# * @param array<int, int|string> $parameters
# * @return bool'
- name: failsBasicDimensionChecks
visibility: protected
parameters:
- name: parameters
- name: width
- name: height
comment: '# * Test if the given width and height fail any conditions.
# *
# * @param array<string,string> $parameters
# * @param int $width
# * @param int $height
# * @return bool'
- name: failsRatioCheck
visibility: protected
parameters:
- name: parameters
- name: width
- name: height
comment: '# * Determine if the given parameters fail a dimension ratio check.
# *
# * @param array<string,string> $parameters
# * @param int $width
# * @param int $height
# * @return bool'
- name: validateDistinct
visibility: public
parameters:
- name: attribute
- name: value
- name: parameters
comment: '# * Validate an attribute is unique among other values.
# *
# * @param string $attribute
# * @param mixed $value
# * @param array<int, int|string> $parameters
# * @return bool'
- name: getDistinctValues
visibility: protected
parameters:
- name: attribute
comment: '# * Get the values to distinct between.
# *
# * @param string $attribute
# * @return array'
- name: extractDistinctValues
visibility: protected
parameters:
- name: attribute
comment: '# * Extract the distinct values from the data.
# *
# * @param string $attribute
# * @return array'
- name: validateEmail
visibility: public
parameters:
- name: attribute
- name: value
- name: parameters
comment: '# * Validate that an attribute is a valid e-mail address.
# *
# * @param string $attribute
# * @param mixed $value
# * @param array<int, int|string> $parameters
# * @return bool'
- name: validateExists
visibility: public
parameters:
- name: attribute
- name: value
- name: parameters
comment: '# * Validate the existence of an attribute value in a database table.
# *
# * @param string $attribute
# * @param mixed $value
# * @param array<int, int|string> $parameters
# * @return bool'
- name: getExistCount
visibility: protected
parameters:
- name: connection
- name: table
- name: column
- name: value
- name: parameters
comment: '# * Get the number of records that exist in storage.
# *
# * @param mixed $connection
# * @param string $table
# * @param string $column
# * @param mixed $value
# * @param array<int, int|string> $parameters
# * @return int'
- name: validateUnique
visibility: public
parameters:
- name: attribute
- name: value
- name: parameters
comment: '# * Validate the uniqueness of an attribute value on a given database
table.
# *
# * If a database column is not specified, the attribute will be used.
# *
# * @param string $attribute
# * @param mixed $value
# * @param array<int, int|string> $parameters
# * @return bool'
- name: getUniqueIds
visibility: protected
parameters:
- name: idColumn
- name: parameters
comment: '# * Get the excluded ID column and value for the unique rule.
# *
# * @param string|null $idColumn
# * @param array<int, int|string> $parameters
# * @return array'
- name: prepareUniqueId
visibility: protected
parameters:
- name: id
comment: '# * Prepare the given ID for querying.
# *
# * @param mixed $id
# * @return int'
- name: getUniqueExtra
visibility: protected
parameters:
- name: parameters
comment: '# * Get the extra conditions for a unique rule.
# *
# * @param array<int, int|string> $parameters
# * @return array'
- name: parseTable
visibility: public
parameters:
- name: table
comment: '# * Parse the connection / table for the unique / exists rules.
# *
# * @param string $table
# * @return array'
- name: getQueryColumn
visibility: public
parameters:
- name: parameters
- name: attribute
comment: '# * Get the column name for an exists / unique query.
# *
# * @param array<int, int|string> $parameters
# * @param string $attribute
# * @return bool'
- name: guessColumnForQuery
visibility: public
parameters:
- name: attribute
comment: '# * Guess the database column from the given attribute name.
# *
# * @param string $attribute
# * @return string'
- name: getExtraConditions
visibility: protected
parameters:
- name: segments
comment: '# * Get the extra conditions for a unique / exists rule.
# *
# * @param array $segments
# * @return array'
- name: validateExtensions
visibility: public
parameters:
- name: attribute
- name: value
- name: parameters
comment: '# * Validate the extension of a file upload attribute is in a set of defined
extensions.
# *
# * @param string $attribute
# * @param mixed $value
# * @param array<int, int|string> $parameters
# * @return bool'
- name: validateFile
visibility: public
parameters:
- name: attribute
- name: value
comment: '# * Validate the given value is a valid file.
# *
# * @param string $attribute
# * @param mixed $value
# * @return bool'
- name: validateFilled
visibility: public
parameters:
- name: attribute
- name: value
comment: '# * Validate the given attribute is filled if it is present.
# *
# * @param string $attribute
# * @param mixed $value
# * @return bool'
- name: validateGt
visibility: public
parameters:
- name: attribute
- name: value
- name: parameters
comment: '# * Validate that an attribute is greater than another attribute.
# *
# * @param string $attribute
# * @param mixed $value
# * @param array<int, int|string> $parameters
# * @return bool'
- name: validateLt
visibility: public
parameters:
- name: attribute
- name: value
- name: parameters
comment: '# * Validate that an attribute is less than another attribute.
# *
# * @param string $attribute
# * @param mixed $value
# * @param array<int, int|string> $parameters
# * @return bool'
- name: validateGte
visibility: public
parameters:
- name: attribute
- name: value
- name: parameters
comment: '# * Validate that an attribute is greater than or equal another attribute.
# *
# * @param string $attribute
# * @param mixed $value
# * @param array<int, int|string> $parameters
# * @return bool'
- name: validateLte
visibility: public
parameters:
- name: attribute
- name: value
- name: parameters
comment: '# * Validate that an attribute is less than or equal another attribute.
# *
# * @param string $attribute
# * @param mixed $value
# * @param array<int, int|string> $parameters
# * @return bool'
- name: validateLowercase
visibility: public
parameters:
- name: attribute
- name: value
- name: parameters
comment: '# * Validate that an attribute is lowercase.
# *
# * @param string $attribute
# * @param mixed $value
# * @param array<int, int|string> $parameters
# * @return bool'
- name: validateUppercase
visibility: public
parameters:
- name: attribute
- name: value
- name: parameters
comment: '# * Validate that an attribute is uppercase.
# *
# * @param string $attribute
# * @param mixed $value
# * @param array<int, int|string> $parameters
# * @return bool'
- name: validateHexColor
visibility: public
parameters:
- name: attribute
- name: value
comment: '# * Validate that an attribute is a valid HEX color.
# *
# * @param string $attribute
# * @param mixed $value
# * @return bool'
- name: validateImage
visibility: public
parameters:
- name: attribute
- name: value
comment: '# * Validate the MIME type of a file is an image MIME type.
# *
# * @param string $attribute
# * @param mixed $value
# * @return bool'
- name: validateIn
visibility: public
parameters:
- name: attribute
- name: value
- name: parameters
comment: '# * Validate an attribute is contained within a list of values.
# *
# * @param string $attribute
# * @param mixed $value
# * @param array<int, int|string> $parameters
# * @return bool'
- name: validateInArray
visibility: public
parameters:
- name: attribute
- name: value
- name: parameters
comment: '# * Validate that the values of an attribute are in another attribute.
# *
# * @param string $attribute
# * @param mixed $value
# * @param array<int, int|string> $parameters
# * @return bool'
- name: validateInteger
visibility: public
parameters:
- name: attribute
- name: value
comment: '# * Validate that an attribute is an integer.
# *
# * @param string $attribute
# * @param mixed $value
# * @return bool'
- name: validateIp
visibility: public
parameters:
- name: attribute
- name: value
comment: '# * Validate that an attribute is a valid IP.
# *
# * @param string $attribute
# * @param mixed $value
# * @return bool'
- name: validateIpv4
visibility: public
parameters:
- name: attribute
- name: value
comment: '# * Validate that an attribute is a valid IPv4.
# *
# * @param string $attribute
# * @param mixed $value
# * @return bool'
- name: validateIpv6
visibility: public
parameters:
- name: attribute
- name: value
comment: '# * Validate that an attribute is a valid IPv6.
# *
# * @param string $attribute
# * @param mixed $value
# * @return bool'
- name: validateMacAddress
visibility: public
parameters:
- name: attribute
- name: value
comment: '# * Validate that an attribute is a valid MAC address.
# *
# * @param string $attribute
# * @param mixed $value
# * @return bool'
- name: validateJson
visibility: public
parameters:
- name: attribute
- name: value
comment: '# * Validate the attribute is a valid JSON string.
# *
# * @param string $attribute
# * @param mixed $value
# * @return bool'
- name: validateMax
visibility: public
parameters:
- name: attribute
- name: value
- name: parameters
comment: '# * Validate the size of an attribute is less than or equal to a maximum
value.
# *
# * @param string $attribute
# * @param mixed $value
# * @param array<int, int|string> $parameters
# * @return bool'
- name: validateMaxDigits
visibility: public
parameters:
- name: attribute
- name: value
- name: parameters
comment: '# * Validate that an attribute has a maximum number of digits.
# *
# * @param string $attribute
# * @param mixed $value
# * @param array<int, int|string> $parameters
# * @return bool'
- name: validateMimes
visibility: public
parameters:
- name: attribute
- name: value
- name: parameters
comment: '# * Validate the guessed extension of a file upload is in a set of file
extensions.
# *
# * @param string $attribute
# * @param mixed $value
# * @param array<int, int|string> $parameters
# * @return bool'
- name: validateMimetypes
visibility: public
parameters:
- name: attribute
- name: value
- name: parameters
comment: '# * Validate the MIME type of a file upload attribute is in a set of MIME
types.
# *
# * @param string $attribute
# * @param mixed $value
# * @param array<int, int|string> $parameters
# * @return bool'
- name: shouldBlockPhpUpload
visibility: protected
parameters:
- name: value
- name: parameters
comment: '# * Check if PHP uploads are explicitly allowed.
# *
# * @param mixed $value
# * @param array<int, int|string> $parameters
# * @return bool'
- name: validateMin
visibility: public
parameters:
- name: attribute
- name: value
- name: parameters
comment: '# * Validate the size of an attribute is greater than or equal to a minimum
value.
# *
# * @param string $attribute
# * @param mixed $value
# * @param array<int, int|string> $parameters
# * @return bool'
- name: validateMinDigits
visibility: public
parameters:
- name: attribute
- name: value
- name: parameters
comment: '# * Validate that an attribute has a minimum number of digits.
# *
# * @param string $attribute
# * @param mixed $value
# * @param array<int, int|string> $parameters
# * @return bool'
- name: validateMissing
visibility: public
parameters:
- name: attribute
- name: value
- name: parameters
comment: '# * Validate that an attribute is missing.
# *
# * @param string $attribute
# * @param mixed $value
# * @param array<int, int|string> $parameters
# * @return bool'
- name: validateMissingIf
visibility: public
parameters:
- name: attribute
- name: value
- name: parameters
comment: '# * Validate that an attribute is missing when another attribute has a
given value.
# *
# * @param string $attribute
# * @param mixed $value
# * @param array<int, int|string> $parameters
# * @return bool'
- name: validateMissingUnless
visibility: public
parameters:
- name: attribute
- name: value
- name: parameters
comment: '# * Validate that an attribute is missing unless another attribute has
a given value.
# *
# * @param string $attribute
# * @param mixed $value
# * @param array<int, int|string> $parameters
# * @return bool'
- name: validateMissingWith
visibility: public
parameters:
- name: attribute
- name: value
- name: parameters
comment: '# * Validate that an attribute is missing when any given attribute is
present.
# *
# * @param string $attribute
# * @param mixed $value
# * @param array<int, int|string> $parameters
# * @return bool'
- name: validateMissingWithAll
visibility: public
parameters:
- name: attribute
- name: value
- name: parameters
comment: '# * Validate that an attribute is missing when all given attributes are
present.
# *
# * @param string $attribute
# * @param mixed $value
# * @param array<int, int|string> $parameters
# * @return bool'
- name: validateMultipleOf
visibility: public
parameters:
- name: attribute
- name: value
- name: parameters
comment: '# * Validate the value of an attribute is a multiple of a given value.
# *
# * @param string $attribute
# * @param mixed $value
# * @param array<int, int|string> $parameters
# * @return bool'
- name: validateNullable
visibility: public
parameters: []
comment: '# * "Indicate" validation should pass if value is null.
# *
# * Always returns true, just lets us put "nullable" in rules.
# *
# * @return bool'
- name: validateNotIn
visibility: public
parameters:
- name: attribute
- name: value
- name: parameters
comment: '# * Validate an attribute is not contained within a list of values.
# *
# * @param string $attribute
# * @param mixed $value
# * @param array<int, int|string> $parameters
# * @return bool'
- name: validateNumeric
visibility: public
parameters:
- name: attribute
- name: value
comment: '# * Validate that an attribute is numeric.
# *
# * @param string $attribute
# * @param mixed $value
# * @return bool'
- name: validatePresent
visibility: public
parameters:
- name: attribute
- name: value
comment: '# * Validate that an attribute exists even if not filled.
# *
# * @param string $attribute
# * @param mixed $value
# * @return bool'
- name: validatePresentIf
visibility: public
parameters:
- name: attribute
- name: value
- name: parameters
comment: '# * Validate that an attribute is present when another attribute has a
given value.
# *
# * @param string $attribute
# * @param mixed $value
# * @param array<int, int|string> $parameters
# * @return bool'
- name: validatePresentUnless
visibility: public
parameters:
- name: attribute
- name: value
- name: parameters
comment: '# * Validate that an attribute is present unless another attribute has
a given value.
# *
# * @param string $attribute
# * @param mixed $value
# * @param array<int, int|string> $parameters
# * @return bool'
- name: validatePresentWith
visibility: public
parameters:
- name: attribute
- name: value
- name: parameters
comment: '# * Validate that an attribute is present when any given attribute is
present.
# *
# * @param string $attribute
# * @param mixed $value
# * @param array<int, int|string> $parameters
# * @return bool'
- name: validatePresentWithAll
visibility: public
parameters:
- name: attribute
- name: value
- name: parameters
comment: '# * Validate that an attribute is present when all given attributes are
present.
# *
# * @param string $attribute
# * @param mixed $value
# * @param array<int, int|string> $parameters
# * @return bool'
- name: validateRegex
visibility: public
parameters:
- name: attribute
- name: value
- name: parameters
comment: '# * Validate that an attribute passes a regular expression check.
# *
# * @param string $attribute
# * @param mixed $value
# * @param array<int, int|string> $parameters
# * @return bool'
- name: validateNotRegex
visibility: public
parameters:
- name: attribute
- name: value
- name: parameters
comment: '# * Validate that an attribute does not pass a regular expression check.
# *
# * @param string $attribute
# * @param mixed $value
# * @param array<int, int|string> $parameters
# * @return bool'
- name: validateRequired
visibility: public
parameters:
- name: attribute
- name: value
comment: '# * Validate that a required attribute exists.
# *
# * @param string $attribute
# * @param mixed $value
# * @return bool'
- name: validateRequiredIf
visibility: public
parameters:
- name: attribute
- name: value
- name: parameters
comment: '# * Validate that an attribute exists when another attribute has a given
value.
# *
# * @param string $attribute
# * @param mixed $value
# * @param mixed $parameters
# * @return bool'
- name: validateRequiredIfAccepted
visibility: public
parameters:
- name: attribute
- name: value
- name: parameters
comment: '# * Validate that an attribute exists when another attribute was "accepted".
# *
# * @param string $attribute
# * @param mixed $value
# * @param mixed $parameters
# * @return bool'
- name: validateRequiredIfDeclined
visibility: public
parameters:
- name: attribute
- name: value
- name: parameters
comment: '# * Validate that an attribute exists when another attribute was "declined".
# *
# * @param string $attribute
# * @param mixed $value
# * @param mixed $parameters
# * @return bool'
- name: validateProhibited
visibility: public
parameters:
- name: attribute
- name: value
comment: '# * Validate that an attribute does not exist or is an empty string.
# *
# * @param string $attribute
# * @param mixed $value
# * @return bool'
- name: validateProhibitedIf
visibility: public
parameters:
- name: attribute
- name: value
- name: parameters
comment: '# * Validate that an attribute does not exist when another attribute has
a given value.
# *
# * @param string $attribute
# * @param mixed $value
# * @param mixed $parameters
# * @return bool'
- name: validateProhibitedUnless
visibility: public
parameters:
- name: attribute
- name: value
- name: parameters
comment: '# * Validate that an attribute does not exist unless another attribute
has a given value.
# *
# * @param string $attribute
# * @param mixed $value
# * @param mixed $parameters
# * @return bool'
- name: validateProhibits
visibility: public
parameters:
- name: attribute
- name: value
- name: parameters
comment: '# * Validate that other attributes do not exist when this attribute exists.
# *
# * @param string $attribute
# * @param mixed $value
# * @param mixed $parameters
# * @return bool'
- name: validateExclude
visibility: public
parameters: []
comment: '# * Indicate that an attribute is excluded.
# *
# * @return bool'
- name: validateExcludeIf
visibility: public
parameters:
- name: attribute
- name: value
- name: parameters
comment: '# * Indicate that an attribute should be excluded when another attribute
has a given value.
# *
# * @param string $attribute
# * @param mixed $value
# * @param mixed $parameters
# * @return bool'
- name: validateExcludeUnless
visibility: public
parameters:
- name: attribute
- name: value
- name: parameters
comment: '# * Indicate that an attribute should be excluded when another attribute
does not have a given value.
# *
# * @param string $attribute
# * @param mixed $value
# * @param mixed $parameters
# * @return bool'
- name: validateRequiredUnless
visibility: public
parameters:
- name: attribute
- name: value
- name: parameters
comment: '# * Validate that an attribute exists when another attribute does not
have a given value.
# *
# * @param string $attribute
# * @param mixed $value
# * @param mixed $parameters
# * @return bool'
- name: validateExcludeWith
visibility: public
parameters:
- name: attribute
- name: value
- name: parameters
comment: '# * Indicate that an attribute should be excluded when another attribute
presents.
# *
# * @param string $attribute
# * @param mixed $value
# * @param mixed $parameters
# * @return bool'
- name: validateExcludeWithout
visibility: public
parameters:
- name: attribute
- name: value
- name: parameters
comment: '# * Indicate that an attribute should be excluded when another attribute
is missing.
# *
# * @param string $attribute
# * @param mixed $value
# * @param mixed $parameters
# * @return bool'
- name: parseDependentRuleParameters
visibility: public
parameters:
- name: parameters
comment: '# * Prepare the values and the other value for validation.
# *
# * @param array<int, int|string> $parameters
# * @return array'
- name: shouldConvertToBoolean
visibility: protected
parameters:
- name: parameter
comment: '# * Check if parameter should be converted to boolean.
# *
# * @param string $parameter
# * @return bool'
- name: convertValuesToBoolean
visibility: protected
parameters:
- name: values
comment: '# * Convert the given values to boolean if they are string "true" / "false".
# *
# * @param array $values
# * @return array'
- name: convertValuesToNull
visibility: protected
parameters:
- name: values
comment: '# * Convert the given values to null if they are string "null".
# *
# * @param array $values
# * @return array'
- name: validateRequiredWith
visibility: public
parameters:
- name: attribute
- name: value
- name: parameters
comment: '# * Validate that an attribute exists when any other attribute exists.
# *
# * @param string $attribute
# * @param mixed $value
# * @param mixed $parameters
# * @return bool'
- name: validateRequiredWithAll
visibility: public
parameters:
- name: attribute
- name: value
- name: parameters
comment: '# * Validate that an attribute exists when all other attributes exist.
# *
# * @param string $attribute
# * @param mixed $value
# * @param mixed $parameters
# * @return bool'
- name: validateRequiredWithout
visibility: public
parameters:
- name: attribute
- name: value
- name: parameters
comment: '# * Validate that an attribute exists when another attribute does not.
# *
# * @param string $attribute
# * @param mixed $value
# * @param mixed $parameters
# * @return bool'
- name: validateRequiredWithoutAll
visibility: public
parameters:
- name: attribute
- name: value
- name: parameters
comment: '# * Validate that an attribute exists when all other attributes do not.
# *
# * @param string $attribute
# * @param mixed $value
# * @param mixed $parameters
# * @return bool'
- name: anyFailingRequired
visibility: protected
parameters:
- name: attributes
comment: '# * Determine if any of the given attributes fail the required test.
# *
# * @param array $attributes
# * @return bool'
- name: allFailingRequired
visibility: protected
parameters:
- name: attributes
comment: '# * Determine if all of the given attributes fail the required test.
# *
# * @param array $attributes
# * @return bool'
- name: validateSame
visibility: public
parameters:
- name: attribute
- name: value
- name: parameters
comment: '# * Validate that two attributes match.
# *
# * @param string $attribute
# * @param mixed $value
# * @param array<int, int|string> $parameters
# * @return bool'
- name: validateSize
visibility: public
parameters:
- name: attribute
- name: value
- name: parameters
comment: '# * Validate the size of an attribute.
# *
# * @param string $attribute
# * @param mixed $value
# * @param array<int, int|string> $parameters
# * @return bool'
- name: validateSometimes
visibility: public
parameters: []
comment: '# * "Validate" optional attributes.
# *
# * Always returns true, just lets us put sometimes in rules.
# *
# * @return bool'
- name: validateStartsWith
visibility: public
parameters:
- name: attribute
- name: value
- name: parameters
comment: '# * Validate the attribute starts with a given substring.
# *
# * @param string $attribute
# * @param mixed $value
# * @param array<int, int|string> $parameters
# * @return bool'
- name: validateDoesntStartWith
visibility: public
parameters:
- name: attribute
- name: value
- name: parameters
comment: '# * Validate the attribute does not start with a given substring.
# *
# * @param string $attribute
# * @param mixed $value
# * @param array<int, int|string> $parameters
# * @return bool'
- name: validateEndsWith
visibility: public
parameters:
- name: attribute
- name: value
- name: parameters
comment: '# * Validate the attribute ends with a given substring.
# *
# * @param string $attribute
# * @param mixed $value
# * @param array<int, int|string> $parameters
# * @return bool'
- name: validateDoesntEndWith
visibility: public
parameters:
- name: attribute
- name: value
- name: parameters
comment: '# * Validate the attribute does not end with a given substring.
# *
# * @param string $attribute
# * @param mixed $value
# * @param array<int, int|string> $parameters
# * @return bool'
- name: validateString
visibility: public
parameters:
- name: attribute
- name: value
comment: '# * Validate that an attribute is a string.
# *
# * @param string $attribute
# * @param mixed $value
# * @return bool'
- name: validateTimezone
visibility: public
parameters:
- name: attribute
- name: value
- name: parameters
default: '[]'
comment: '# * Validate that an attribute is a valid timezone.
# *
# * @param string $attribute
# * @param mixed $value
# * @param array<string, null|string> $parameters
# * @return bool'
- name: validateUrl
visibility: public
parameters:
- name: attribute
- name: value
- name: parameters
default: '[]'
comment: '# * Validate that an attribute is a valid URL.
# *
# * @param string $attribute
# * @param mixed $value
# * @param array<int, string> $parameters
# * @return bool'
- name: validateUlid
visibility: public
parameters:
- name: attribute
- name: value
comment: '# * Validate that an attribute is a valid ULID.
# *
# * @param string $attribute
# * @param mixed $value
# * @return bool'
- name: validateUuid
visibility: public
parameters:
- name: attribute
- name: value
comment: '# * Validate that an attribute is a valid UUID.
# *
# * @param string $attribute
# * @param mixed $value
# * @return bool'
- name: getSize
visibility: protected
parameters:
- name: attribute
- name: value
comment: '# * Get the size of an attribute.
# *
# * @param string $attribute
# * @param mixed $value
# * @return int|float|string'
- name: isValidFileInstance
visibility: public
parameters:
- name: value
comment: '# * Check that the given value is a valid file instance.
# *
# * @param mixed $value
# * @return bool'
- name: compare
visibility: protected
parameters:
- name: first
- name: second
- name: operator
comment: '# * Determine if a comparison passes between the given values.
# *
# * @param mixed $first
# * @param mixed $second
# * @param string $operator
# * @return bool
# *
# * @throws \InvalidArgumentException'
- name: parseNamedParameters
visibility: public
parameters:
- name: parameters
comment: '# * Parse named parameters to $key => $value items.
# *
# * @param array<int, int|string> $parameters
# * @return array'
- name: requireParameterCount
visibility: public
parameters:
- name: count
- name: parameters
- name: rule
comment: '# * Require a certain number of parameters to be present.
# *
# * @param int $count
# * @param array<int, int|string> $parameters
# * @param string $rule
# * @return void
# *
# * @throws \InvalidArgumentException'
- name: isSameType
visibility: protected
parameters:
- name: first
- name: second
comment: '# * Check if the parameters are of the same type.
# *
# * @param mixed $first
# * @param mixed $second
# * @return bool'
- name: shouldBeNumeric
visibility: protected
parameters:
- name: attribute
- name: rule
comment: '# * Adds the existing rule to the numericRules array if the attribute''s
value is numeric.
# *
# * @param string $attribute
# * @param string $rule
# * @return void'
- name: trim
visibility: protected
parameters:
- name: value
comment: '# * Trim the value if it is a string.
# *
# * @param mixed $value
# * @return mixed'
- name: ensureExponentWithinAllowedRange
visibility: protected
parameters:
- name: attribute
- name: value
comment: '# * Ensure the exponent is within the allowed range.
# *
# * @param string $attribute
# * @param mixed $value
# * @return mixed'
traits:
- Brick\Math\BigDecimal
- Brick\Math\BigNumber
- DateTime
- DateTimeInterface
- DateTimeZone
- Egulias\EmailValidator\EmailValidator
- Egulias\EmailValidator\Validation\DNSCheckValidation
- Egulias\EmailValidator\Validation\Extra\SpoofCheckValidation
- Egulias\EmailValidator\Validation\MultipleValidationWithAnd
- Egulias\EmailValidator\Validation\NoRFCWarningsValidation
- Egulias\EmailValidator\Validation\RFCValidation
- Exception
- Illuminate\Container\Container
- Illuminate\Database\Eloquent\Model
- Illuminate\Support\Arr
- Illuminate\Support\Exceptions\MathException
- Illuminate\Support\Facades\Date
- Illuminate\Support\Str
- Illuminate\Validation\Rules\Exists
- Illuminate\Validation\Rules\Unique
- Illuminate\Validation\ValidationData
- InvalidArgumentException
- Symfony\Component\HttpFoundation\File\File
- Symfony\Component\HttpFoundation\File\UploadedFile
- ValueError
interfaces: []