Skip to content

Validator

Properties

translator

The StringTranslator implementation.

public \Qubus\Validation\Translators\StringTranslator $translator

presenceVerifier

The Presence Verifier implementation.

protected ?\Qubus\Validation\Interfaces\PresenceVerifier $presenceVerifier

failedRules

The failed validation rules.

protected array $failedRules

messages

The messages.

protected ?\Qubus\Validation\MessageBag $messages

data

The data under validation.

public array $data

files

The files under validation.

protected array $files

rules

The rules to be applied to the data.

protected array $rules

after

All the registered "after" callbacks.

protected array $after

customMessages

The array of custom error messages.

public array $customMessages

fallbackMessages

The array of fallback error messages.

public array $fallbackMessages

customAttributes

The array of custom attribute names.

protected array $customAttributes

customValues

The array of custom displayable values.

public array $customValues

extensions

All the custom validator extensions.

protected array $extensions

replacers

All the custom replacer extensions.

public array $replacers

sizeRules

The size related validation rules.

protected array $sizeRules

numericRules

The numeric related validation rules.

protected array $numericRules

implicitRules

The validation rules that imply the field is required.

protected array $implicitRules

Methods

__construct

Create a new Validator instance.

public __construct(\Qubus\Validation\Translators\StringTranslator $translator, array $data, array $rules, array $messages = [], array $customAttributes = []): mixed

Parameters:

Parameter Type Description
$translator \Qubus\Validation\Translators\StringTranslator
$data array
$rules array
$messages array
$customAttributes array

parseData

Parse the data and hydrate the files array.

protected parseData(array $data): array

Parameters:

Parameter Type Description
$data array

explodeRules

Explode the rules into an array of rules.

protected explodeRules(array|string $rules): array

Parameters:

Parameter Type Description
$rules array|string

after

After an after validation callback.

public after(callable|string $callback): $this

Parameters:

Parameter Type Description
$callback callable|string

sometimes

Add conditions to a given field based on a Closure.

public sometimes(string $attribute, array|string $rules, callable $callback): void

Parameters:

Parameter Type Description
$attribute string
$rules array|string
$callback callable

each

Define a set of rules that apply to each element in an array attribute.

public each(string $attribute, array|string $rules): void

Parameters:

Parameter Type Description
$attribute string
$rules array|string

Throws:


mergeRules

Merge additional rules into a given attribute.

public mergeRules(string $attribute, array|string $rules): void

Parameters:

Parameter Type Description
$attribute string
$rules array|string

passes

Determine if the data passes the validation rules.

public passes(): bool

fails

Determine if the data fails the validation rules.

public fails(): bool

validate

Validate a given attribute against a rule.

protected validate(string $attribute, string $rule): void

Parameters:

Parameter Type Description
$attribute string
$rule string

getValue

Get the value of a given attribute.

protected getValue(string $attribute): mixed

Parameters:

Parameter Type Description
$attribute string

isValidatable

Determine if the attribute is validatable.

protected isValidatable(string $rule, string $attribute, mixed $value): bool

Parameters:

Parameter Type Description
$rule string
$attribute string
$value mixed

presentOrRuleIsImplicit

Determine if the field is present, or the rule implies required.

protected presentOrRuleIsImplicit(string $rule, string $attribute, mixed $value): bool

Parameters:

Parameter Type Description
$rule string
$attribute string
$value mixed

passesOptionalCheck

Determine if the attribute passes any optional check.

protected passesOptionalCheck(string $attribute): bool

Parameters:

Parameter Type Description
$attribute string

isImplicit

Determine if a given rule implies the attribute is required.

protected isImplicit(string $rule): bool

Parameters:

Parameter Type Description
$rule string

addFailure

Add a failed rule and error message to the collection.

protected addFailure(string $attribute, string $rule, array $parameters): void

Parameters:

Parameter Type Description
$attribute string
$rule string
$parameters array

addError

Add an error message to the validator's collection of messages.

protected addError(string $attribute, string $rule, array $parameters): void

Parameters:

Parameter Type Description
$attribute string
$rule string
$parameters array

validateSometimes

"Validate" optional attributes.

protected validateSometimes(): bool

Always returns true, just lets us put sometimes in rules.


validateRequired

Validate that a required attribute exists.

protected validateRequired(string $attribute, mixed $value): bool

Parameters:

Parameter Type Description
$attribute string
$value mixed

validateFilled

Validate the given attribute is filled if it is present.

protected validateFilled(string $attribute, mixed $value): bool

Parameters:

Parameter Type Description
$attribute string
$value mixed

anyFailingRequired

Determine if any of the given attributes fail the required test.

protected anyFailingRequired(array $attributes): bool

Parameters:

Parameter Type Description
$attributes array

allFailingRequired

Determine if all the given attributes fail the required test.

protected allFailingRequired(array $attributes): bool

Parameters:

Parameter Type Description
$attributes array

validateRequiredWith

Validate that an attribute exists when any other attribute exists.

protected validateRequiredWith(string $attribute, mixed $value, mixed $parameters): bool

Parameters:

Parameter Type Description
$attribute string
$value mixed
$parameters mixed

validateRequiredWithAll

Validate that an attribute exists when all other attributes exists.

protected validateRequiredWithAll(string $attribute, mixed $value, mixed $parameters): bool

Parameters:

Parameter Type Description
$attribute string
$value mixed
$parameters mixed

validateRequiredWithout

Validate that an attribute exists when another attribute does not.

protected validateRequiredWithout(string $attribute, mixed $value, mixed $parameters): bool

Parameters:

Parameter Type Description
$attribute string
$value mixed
$parameters mixed

validateRequiredWithoutAll

Validate that an attribute exists when all other attributes do not.

protected validateRequiredWithoutAll(string $attribute, mixed $value, mixed $parameters): bool

Parameters:

Parameter Type Description
$attribute string
$value mixed
$parameters mixed

validateRequiredIf

Validate that an attribute exists when another attribute has a given value.

protected validateRequiredIf(string $attribute, mixed $value, mixed $parameters): bool

Parameters:

Parameter Type Description
$attribute string
$value mixed
$parameters mixed

Throws:


getPresentCount

Get the number of attributes in a list that are present.

protected getPresentCount(array $attributes): int

Parameters:

Parameter Type Description
$attributes array

validateConfirmed

Validate that an attribute has a matching confirmation.

protected validateConfirmed(string $attribute, mixed $value): bool

Parameters:

Parameter Type Description
$attribute string
$value mixed

Throws:


validateSame

Validate that two attributes match.

protected validateSame(string $attribute, mixed $value, array $parameters): bool

Parameters:

Parameter Type Description
$attribute string
$value mixed
$parameters array

Throws:


validateDifferent

Validate that an attribute is different from another attribute.

protected validateDifferent(string $attribute, mixed $value, array $parameters): bool

Parameters:

Parameter Type Description
$attribute string
$value mixed
$parameters array

Throws:


validateAccepted

Validate that an attribute was "accepted".

protected validateAccepted(string $attribute, mixed $value): bool

This validation rule implies the attribute is "required".

Parameters:

Parameter Type Description
$attribute string
$value mixed

validateBoolean

Validate that an attribute is a boolean.

protected validateBoolean(string $attribute, mixed $value): bool

Parameters:

Parameter Type Description
$attribute string
$value mixed

validateArray

Validate that an attribute is an array.

protected validateArray(string $attribute, mixed $value): bool

Parameters:

Parameter Type Description
$attribute string
$value mixed

validateNumeric

Validate that an attribute is numeric.

protected validateNumeric(string $attribute, mixed $value): bool

Parameters:

Parameter Type Description
$attribute string
$value mixed

validateInteger

Validate that an attribute is an integer.

protected validateInteger(string $attribute, mixed $value): bool

Parameters:

Parameter Type Description
$attribute string
$value mixed

validateDigits

Validate that an attribute has a given number of digits.

protected validateDigits(string $attribute, mixed $value, array $parameters): bool

Parameters:

Parameter Type Description
$attribute string
$value mixed
$parameters array

Throws:


validateDigitsBetween

Validate that an attribute is between a given number of digits.

protected validateDigitsBetween(string $attribute, mixed $value, array $parameters): bool

Parameters:

Parameter Type Description
$attribute string
$value mixed
$parameters array

Throws:


validateSize

Validate the size of an attribute.

protected validateSize(string $attribute, mixed $value, array $parameters): bool

Parameters:

Parameter Type Description
$attribute string
$value mixed
$parameters array

Throws:


validateBetween

Validate the size of an attribute is between a set of values.

protected validateBetween(string $attribute, mixed $value, array $parameters): bool

Parameters:

Parameter Type Description
$attribute string
$value mixed
$parameters array

Throws:


validateMin

Validate the size of an attribute is greater than a minimum value.

protected validateMin(string $attribute, mixed $value, array $parameters): bool

Parameters:

Parameter Type Description
$attribute string
$value mixed
$parameters array

Throws:


validateMax

Validate the size of an attribute is less than a maximum value.

protected validateMax(string $attribute, mixed $value, array $parameters): bool

Parameters:

Parameter Type Description
$attribute string
$value mixed
$parameters array

Throws:


getSize

Get the size of an attribute.

protected getSize(string $attribute, mixed $value): array|int|float|null

Parameters:

Parameter Type Description
$attribute string
$value mixed

getStringSize

Get the size of a string.

protected getStringSize(string $value): int

Parameters:

Parameter Type Description
$value string

validateIn

Validate an attribute is contained within a list of values.

protected validateIn(string $attribute, mixed $value, array $parameters): bool

Parameters:

Parameter Type Description
$attribute string
$value mixed
$parameters array

validateNotIn

Validate an attribute is not contained within a list of values.

protected validateNotIn(string $attribute, mixed $value, array $parameters): bool

Parameters:

Parameter Type Description
$attribute string
$value mixed
$parameters array

validateUnique

Validate the uniqueness of an attribute value on a given database table.

protected validateUnique(string $attribute, mixed $value, array $parameters): bool

If a database column is not specified, the attribute will be used.

Parameters:

Parameter Type Description
$attribute string
$value mixed
$parameters array

Throws:


getUniqueIds

Get the excluded ID column and value for the unique rule.

protected getUniqueIds(array $parameters): array

Parameters:

Parameter Type Description
$parameters array

getUniqueExtra

Get the extra conditions for a unique rule.

protected getUniqueExtra(array $parameters): array

Parameters:

Parameter Type Description
$parameters array

validateExists

Validate the existence of an attribute value in a database table.

protected validateExists(string $attribute, mixed $value, array $parameters): bool

Parameters:

Parameter Type Description
$attribute string
$value mixed
$parameters array

Throws:


getExistCount

Get the number of records that exist in storage.

protected getExistCount(string $table, string $column, mixed $value, array $parameters): int

Parameters:

Parameter Type Description
$table string
$column string
$value mixed
$parameters array

getExtraExistConditions

Get the extra exist conditions.

protected getExtraExistConditions(array $parameters): array

Parameters:

Parameter Type Description
$parameters array

getExtraConditions

Get the extra conditions for a unique / exists rule.

protected getExtraConditions(array $segments): array

Parameters:

Parameter Type Description
$segments array

validateIp

Validate that an attribute is a valid IP.

protected validateIp(string $attribute, mixed $value): bool

Parameters:

Parameter Type Description
$attribute string
$value mixed

validateIpv4

Validate that an attribute is a valid IPv4.

protected validateIpv4(string $attribute, mixed $value): bool

Parameters:

Parameter Type Description
$attribute string
$value mixed

validateIpv6

Validate that an attribute is a valid IPv6.

protected validateIpv6(string $attribute, mixed $value): bool

Parameters:

Parameter Type Description
$attribute string
$value mixed

validateEmail

Validate that an attribute is a valid e-mail address.

protected validateEmail(string $attribute, mixed $value): bool

Parameters:

Parameter Type Description
$attribute string
$value mixed

validateUrl

Validate that an attribute is a valid URL.

protected validateUrl(string $attribute, mixed $value): bool

Parameters:

Parameter Type Description
$attribute string
$value mixed

validateActiveUrl

Validate that an attribute is an active URL.

protected validateActiveUrl(string $attribute, mixed $value): bool

Parameters:

Parameter Type Description
$attribute string
$value mixed

validateImage

Validate the MIME type of file is an image MIME type.

protected validateImage(string $attribute, mixed $value): bool

Parameters:

Parameter Type Description
$attribute string
$value mixed

validateMimes

Validate the MIME type of file upload attribute is in a set of MIME types.

protected validateMimes(string $attribute, array $value, array $parameters): bool

Parameters:

Parameter Type Description
$attribute string
$value array
$parameters array

validateAlpha

Validate that an attribute contains only alphabetic characters.

protected validateAlpha(string $attribute, mixed $value): bool|int

Parameters:

Parameter Type Description
$attribute string
$value mixed

validateAlphaNum

Validate that an attribute contains only alphanumeric characters.

protected validateAlphaNum(string $attribute, mixed $value): bool|int

Parameters:

Parameter Type Description
$attribute string
$value mixed

validateAlphaDash

Validate that an attribute contains only alphanumeric characters, dashes, and underscores.

protected validateAlphaDash(string $attribute, mixed $value): bool|int

Parameters:

Parameter Type Description
$attribute string
$value mixed

validateRegex

Validate that an attribute passes a regular expression check.

protected validateRegex(string $attribute, mixed $value, array $parameters): bool|int

Parameters:

Parameter Type Description
$attribute string
$value mixed
$parameters array

Throws:


validateDate

Validate that an attribute is a valid date.

protected validateDate(string $attribute, mixed $value): bool

Parameters:

Parameter Type Description
$attribute string
$value mixed

validateDateFormat

Validate that an attribute matches a date format.

protected validateDateFormat(string $attribute, mixed $value, array $parameters): bool

Parameters:

Parameter Type Description
$attribute string
$value mixed
$parameters array

Throws:


validateBefore

Validate the date is before a given date.

protected validateBefore(string $attribute, mixed $value, array $parameters): bool

Parameters:

Parameter Type Description
$attribute string
$value mixed
$parameters array

Throws:


validateBeforeWithFormat

Validate the date is before a given date with a given format.

protected validateBeforeWithFormat(string $format, mixed $value, array $parameters): bool

Parameters:

Parameter Type Description
$format string
$value mixed
$parameters array

validateAfter

Validate the date is after a given date.

protected validateAfter(string $attribute, mixed $value, array $parameters): bool

Parameters:

Parameter Type Description
$attribute string
$value mixed
$parameters array

Throws:


validateAfterWithFormat

Validate the date is after a given date with a given format.

protected validateAfterWithFormat(string $format, mixed $value, array $parameters): bool

Parameters:

Parameter Type Description
$format string
$value mixed
$parameters array

checkDateTimeOrder

Given two date/time strings, check that one is after the other.

protected checkDateTimeOrder(string $format, string $before, string $after): bool

Parameters:

Parameter Type Description
$format string
$before string
$after string

getDateTimeWithOptionalFormat

Get a DateTime instance from a string.

protected getDateTimeWithOptionalFormat(string $format, string $value): \DateTime|null

Parameters:

Parameter Type Description
$format string
$value string

validateTimezone

Validate that an attribute is a valid timezone.

protected validateTimezone(string $attribute, mixed $value): bool

Parameters:

Parameter Type Description
$attribute string
$value mixed

Throws:


getDateFormat

Get the date format for an attribute if it has one.

protected getDateFormat(string $attribute): mixed

Parameters:

Parameter Type Description
$attribute string

getMessage

Get the validation message for an attribute and rule.

protected getMessage(string $attribute, string $rule): mixed

Parameters:

Parameter Type Description
$attribute string
$rule string

getInlineMessage

Get the inline message for a rule if it exists.

protected getInlineMessage(string $attribute, string $lowerRule, array|null $source = null): mixed|void

Parameters:

Parameter Type Description
$attribute string
$lowerRule string
$source array|null

getSizeMessage

Get the proper error message for an attribute and size rule.

protected getSizeMessage(string $attribute, string $rule): string

Parameters:

Parameter Type Description
$attribute string
$rule string

getAttributeType

Get the data type of the given attribute.

protected getAttributeType(string $attribute): string

Parameters:

Parameter Type Description
$attribute string

doReplacements

Replace all error message place-holders with actual values.

protected doReplacements(string $message, string $attribute, string $rule, array $parameters): string

Parameters:

Parameter Type Description
$message string
$attribute string
$rule string
$parameters array

getAttributeList

Transform an array of attributes to their displayable form.

protected getAttributeList(array $values): array

Parameters:

Parameter Type Description
$values array

getAttribute

Get the displayable name of the attribute.

protected getAttribute(string $attribute): string

Parameters:

Parameter Type Description
$attribute string

getDisplayableValue

Get the displayable name of the value.

public getDisplayableValue(string $attribute, mixed $value): mixed|string

Parameters:

Parameter Type Description
$attribute string
$value mixed

replaceBetween

Replace all place-holders for the between rule.

protected replaceBetween(string $message, string $attribute, string $rule, array $parameters): string

Parameters:

Parameter Type Description
$message string
$attribute string
$rule string
$parameters array

replaceDigits

Replace all place-holders for the digits rule.

protected replaceDigits(string $message, string $attribute, string $rule, array $parameters): string

Parameters:

Parameter Type Description
$message string
$attribute string
$rule string
$parameters array

replaceDigitsBetween

Replace all place-holders for the digits (between) rule.

protected replaceDigitsBetween(string $message, string $attribute, string $rule, array $parameters): string

Parameters:

Parameter Type Description
$message string
$attribute string
$rule string
$parameters array

replaceSize

Replace all place-holders for the size rule.

protected replaceSize(string $message, string $attribute, string $rule, array $parameters): string

Parameters:

Parameter Type Description
$message string
$attribute string
$rule string
$parameters array

replaceMin

Replace all place-holders for the min rule.

protected replaceMin(string $message, string $attribute, string $rule, array $parameters): string

Parameters:

Parameter Type Description
$message string
$attribute string
$rule string
$parameters array

replaceMax

Replace all place-holders for the max rule.

protected replaceMax(string $message, string $attribute, string $rule, array $parameters): string

Parameters:

Parameter Type Description
$message string
$attribute string
$rule string
$parameters array

replaceIn

Replace all place-holders for the in rule.

protected replaceIn(string $message, string $attribute, string $rule, array $parameters): string

Parameters:

Parameter Type Description
$message string
$attribute string
$rule string
$parameters array

replaceNotIn

Replace all place-holders for the not_in rule.

protected replaceNotIn(string $message, string $attribute, string $rule, array $parameters): string

Parameters:

Parameter Type Description
$message string
$attribute string
$rule string
$parameters array

replaceMimes

Replace all place-holders for the mimes rule.

protected replaceMimes(string $message, string $attribute, string $rule, array $parameters): string

Parameters:

Parameter Type Description
$message string
$attribute string
$rule string
$parameters array

replaceRequiredWith

Replace all place-holders for the required_with rule.

protected replaceRequiredWith(string $message, string $attribute, string $rule, array $parameters): string

Parameters:

Parameter Type Description
$message string
$attribute string
$rule string
$parameters array

replaceRequiredWithAll

Replace all place-holders for the required_with_all rule.

protected replaceRequiredWithAll(string $message, string $attribute, string $rule, array $parameters): string

Parameters:

Parameter Type Description
$message string
$attribute string
$rule string
$parameters array

replaceRequiredWithout

Replace all place-holders for the required_without rule.

protected replaceRequiredWithout(string $message, string $attribute, string $rule, array $parameters): string

Parameters:

Parameter Type Description
$message string
$attribute string
$rule string
$parameters array

replaceRequiredWithoutAll

Replace all place-holders for the required_without_all rule.

protected replaceRequiredWithoutAll(string $message, string $attribute, string $rule, array $parameters): string

Parameters:

Parameter Type Description
$message string
$attribute string
$rule string
$parameters array

replaceRequiredIf

Replace all place-holders for the required_if rule.

protected replaceRequiredIf(string $message, string $attribute, string $rule, array $parameters): string

Parameters:

Parameter Type Description
$message string
$attribute string
$rule string
$parameters array

replaceSame

Replace all place-holders for the same rule.

protected replaceSame(string $message, string $attribute, string $rule, array $parameters): string

Parameters:

Parameter Type Description
$message string
$attribute string
$rule string
$parameters array

replaceDifferent

Replace all place-holders for the different rule.

protected replaceDifferent(string $message, string $attribute, string $rule, array $parameters): string

Parameters:

Parameter Type Description
$message string
$attribute string
$rule string
$parameters array

replaceDateFormat

Replace all place-holders for the date_format rule.

protected replaceDateFormat(string $message, string $attribute, string $rule, array $parameters): string

Parameters:

Parameter Type Description
$message string
$attribute string
$rule string
$parameters array

replaceBefore

Replace all place-holders for the before rule.

protected replaceBefore(string $message, string $attribute, string $rule, array $parameters): string

Parameters:

Parameter Type Description
$message string
$attribute string
$rule string
$parameters array

replaceAfter

Replace all place-holders for the after rule.

protected replaceAfter(string $message, string $attribute, string $rule, array $parameters): string

Parameters:

Parameter Type Description
$message string
$attribute string
$rule string
$parameters array

hasRule

Determine if the given attribute has a rule in the given set.

protected hasRule(string $attribute, array|string $rules): bool

Parameters:

Parameter Type Description
$attribute string
$rules array|string

getRule

Get a rule and its parameters for a given attribute.

protected getRule(string $attribute, array|string $rules): array|null

Parameters:

Parameter Type Description
$attribute string
$rules array|string

parseRule

Extract the rule name and parameters from a rule.

protected parseRule(array|string $rules): array

Parameters:

Parameter Type Description
$rules array|string

parseArrayRule

Parse an array based rule.

protected parseArrayRule(array $rules): array

Parameters:

Parameter Type Description
$rules array

parseStringRule

Parse a string based rule.

protected parseStringRule(string $rules): array

Parameters:

Parameter Type Description
$rules string

parseParameters

Parse a parameter list.

protected parseParameters(string $rule, string $parameter): array

Parameters:

Parameter Type Description
$rule string
$parameter string

addExtensions

Register an array of custom validator extensions.

public addExtensions(array $extensions): void

Parameters:

Parameter Type Description
$extensions array

addImplicitExtensions

Register an array of custom implicit validator extensions.

public addImplicitExtensions(array $extensions): void

Parameters:

Parameter Type Description
$extensions array

addExtension

Register a custom validator extension.

public addExtension(string $rule, string|\Closure $extension): void

Parameters:

Parameter Type Description
$rule string
$extension string|\Closure

addImplicitExtension

Register a custom implicit validator extension.

public addImplicitExtension(string $rule, string|\Closure $extension): void

Parameters:

Parameter Type Description
$rule string
$extension string|\Closure

addReplacers

Register an array of custom validator message replacers.

public addReplacers(array $replacers): void

Parameters:

Parameter Type Description
$replacers array

addReplacer

Register a custom validator message replacer.

public addReplacer(string $rule, string|\Closure $replacer): void

Parameters:

Parameter Type Description
$rule string
$replacer string|\Closure

getRules

Get the validation rules.

public getRules(): array

setRules

Set the validation rules.

public setRules(array $rules): $this

Parameters:

Parameter Type Description
$rules array

setAttributeNames

Set the custom attributes on the validator.

public setAttributeNames(array $attributes): $this

Parameters:

Parameter Type Description
$attributes array

setValueNames

Set the custom values on the validator.

public setValueNames(array $values): $this

Parameters:

Parameter Type Description
$values array

getFiles

Get the files under validation.

public getFiles(): array

setFiles

Set the files under validation.

public setFiles(array $files): $this

Parameters:

Parameter Type Description
$files array

getPresenceVerifier

Get the Presence Verifier implementation.

public getPresenceVerifier(): \Qubus\Validation\Interfaces\PresenceVerifier|null

setPresenceVerifier

Set the Presence Verifier implementation.

public setPresenceVerifier(\Qubus\Validation\Interfaces\PresenceVerifier $presenceVerifier): void

Parameters:

Parameter Type Description
$presenceVerifier \Qubus\Validation\Interfaces\PresenceVerifier

addCustomAttributes

Add custom attributes to the validator.

public addCustomAttributes(array $customAttributes): $this

Parameters:

Parameter Type Description
$customAttributes array

addCustomValues

Add the custom values for the validator.

public addCustomValues(array $customValues): $this

Parameters:

Parameter Type Description
$customValues array

failed

Get the failed validation rules.

public failed(): array

messages

Get the message container for the validator.

public messages(): \Qubus\Validation\MessageBag

errors

An alternative more semantic shortcut to the message container.

public errors(): \Qubus\Validation\MessageBag

callExtension

Call a custom validator extension.

protected callExtension(string $rule, array $parameters): mixed

Parameters:

Parameter Type Description
$rule string
$parameters array

callClassBasedExtension

Call a class based validator extension.

protected callClassBasedExtension(string $callback, array $parameters): bool

Parameters:

Parameter Type Description
$callback string
$parameters array

callReplacer

Call a custom validator message replacer.

protected callReplacer(string $message, string $attribute, string $rule, array $parameters): mixed

Parameters:

Parameter Type Description
$message string
$attribute string
$rule string
$parameters array

callClassBasedReplacer

Call a class based validator message replacer.

protected callClassBasedReplacer(string $callback, string $message, string $attribute, string $rule, array $parameters): string

Parameters:

Parameter Type Description
$callback string
$message string
$attribute string
$rule string
$parameters array

requireParameterCount

Require a certain number of parameters to be present.

protected requireParameterCount(int $count, array $parameters, string $rule): void

Parameters:

Parameter Type Description
$count int
$parameters array
$rule string

Throws:


__call

Handle dynamic calls to class methods.

public __call(string $method, array $parameters): mixed

Parameters:

Parameter Type Description
$method string
$parameters array

Throws:



Automatically generated on 2025-10-13