Documentation

FormatsMessages

Table of Contents

getDisplayableAttribute()  : string
Get the displayable name of the attribute.
getDisplayableValue()  : string
Get the displayable name of the value.
makeReplacements()  : string
Replace all error message place-holders with actual values.
callClassBasedReplacer()  : string
Call a class based validator message replacer.
callReplacer()  : string|null
Call a custom validator message replacer.
getAttributeFromTranslations()  : string
Get the given attribute from the attribute translations.
getAttributeList()  : array<string|int, mixed>
Transform an array of attributes to their displayable form.
getAttributeType()  : string
Get the data type of the given attribute.
getCustomMessageFromTranslator()  : string
Get the custom error message from translator.
getFromLocalArray()  : string|null
Get the inline message for a rule if it exists.
getInlineMessage()  : string|null
Get the proper inline error message for standard and size rules.
getMessage()  : string
Get the validation message for an attribute and rule.
getSizeMessage()  : string
Get the proper error message for an attribute and size rule.
getWildcardCustomMessages()  : string
Check the given messages for a wildcard key.
replaceAttributePlaceholder()  : string
Replace the :attribute placeholder in the given message.
replaceInputPlaceholder()  : string
Replace the :input placeholder in the given message.

Methods

getDisplayableAttribute()

Get the displayable name of the attribute.

public getDisplayableAttribute(string $attribute) : string
Parameters
$attribute : string
Return values
string

getDisplayableValue()

Get the displayable name of the value.

public getDisplayableValue(string $attribute, mixed $value) : string
Parameters
$attribute : string
$value : mixed
Return values
string

makeReplacements()

Replace all error message place-holders with actual values.

public makeReplacements(string $message, string $attribute, string $rule, array<string|int, mixed> $parameters) : string
Parameters
$message : string
$attribute : string
$rule : string
$parameters : array<string|int, mixed>
Return values
string

callClassBasedReplacer()

Call a class based validator message replacer.

protected callClassBasedReplacer(string $callback, string $message, string $attribute, string $rule, array<string|int, mixed> $parameters, Validator $validator) : string
Parameters
$callback : string
$message : string
$attribute : string
$rule : string
$parameters : array<string|int, mixed>
$validator : Validator
Return values
string

callReplacer()

Call a custom validator message replacer.

protected callReplacer(string $message, string $attribute, string $rule, array<string|int, mixed> $parameters, Validator $validator) : string|null
Parameters
$message : string
$attribute : string
$rule : string
$parameters : array<string|int, mixed>
$validator : Validator
Return values
string|null

getAttributeFromTranslations()

Get the given attribute from the attribute translations.

protected getAttributeFromTranslations(string $name) : string
Parameters
$name : string
Return values
string

getAttributeList()

Transform an array of attributes to their displayable form.

protected getAttributeList(array<string|int, mixed> $values) : array<string|int, mixed>
Parameters
$values : array<string|int, mixed>
Return values
array<string|int, mixed>

getAttributeType()

Get the data type of the given attribute.

protected getAttributeType(string $attribute) : string
Parameters
$attribute : string
Return values
string

getCustomMessageFromTranslator()

Get the custom error message from translator.

protected getCustomMessageFromTranslator(string $key) : string
Parameters
$key : string
Return values
string

getFromLocalArray()

Get the inline message for a rule if it exists.

protected getFromLocalArray(string $attribute, string $lowerRule[, array<string|int, mixed>|null $source = null ]) : string|null
Parameters
$attribute : string
$lowerRule : string
$source : array<string|int, mixed>|null = null
Return values
string|null

getInlineMessage()

Get the proper inline error message for standard and size rules.

protected getInlineMessage(string $attribute, string $rule) : string|null
Parameters
$attribute : string
$rule : string
Return values
string|null

getMessage()

Get the validation message for an attribute and rule.

protected getMessage(string $attribute, string $rule) : string
Parameters
$attribute : string
$rule : string
Return values
string

getSizeMessage()

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

protected getSizeMessage(string $attribute, string $rule) : string
Parameters
$attribute : string
$rule : string
Return values
string

getWildcardCustomMessages()

Check the given messages for a wildcard key.

protected getWildcardCustomMessages(array<string|int, mixed> $messages, string $search, string $default) : string
Parameters
$messages : array<string|int, mixed>
$search : string
$default : string
Return values
string

replaceAttributePlaceholder()

Replace the :attribute placeholder in the given message.

protected replaceAttributePlaceholder(string $message, string $value) : string
Parameters
$message : string
$value : string
Return values
string

replaceInputPlaceholder()

Replace the :input placeholder in the given message.

protected replaceInputPlaceholder(string $message, string $attribute) : string
Parameters
$message : string
$attribute : string
Return values
string

Search results