FormatsMessages
trait FormatsMessages (View source)
Traits
Methods
Replace all place-holders for the accepted_if rule.
Replace all place-holders for the declined_if rule.
Replace all place-holders for the between rule.
Replace all place-holders for the date_format rule.
Replace all place-holders for the different rule.
Replace all place-holders for the digits rule.
Replace all place-holders for the digits (between) rule.
Replace all place-holders for the min rule.
Replace all place-holders for the max rule.
Replace all place-holders for the multiple_of rule.
Replace all place-holders for the in rule.
Replace all place-holders for the not_in rule.
Replace all place-holders for the in_array rule.
Replace all place-holders for the required_array_keys rule.
Replace all place-holders for the mimetypes rule.
Replace all place-holders for the mimes rule.
Replace all place-holders for the required_with rule.
Replace all place-holders for the required_with_all rule.
Replace all place-holders for the required_without rule.
Replace all place-holders for the required_without_all rule.
Replace all place-holders for the size rule.
Replace all place-holders for the gt rule.
Replace all place-holders for the lt rule.
Replace all place-holders for the gte rule.
Replace all place-holders for the lte rule.
Replace all place-holders for the required_if rule.
Replace all place-holders for the required_unless rule.
Replace all place-holders for the prohibited_if rule.
Replace all place-holders for the prohibited_unless rule.
Replace all place-holders for the prohibited_with rule.
Replace all place-holders for the same rule.
Replace all place-holders for the before rule.
Replace all place-holders for the before_or_equal rule.
Replace all place-holders for the after rule.
Replace all place-holders for the after_or_equal rule.
Replace all place-holders for the date_equals rule.
Replace all place-holders for the dimensions rule.
Replace all place-holders for the ends_with rule.
Replace all place-holders for the starts_with rule.
Get the validation message for an attribute and rule.
Get the proper inline error message for standard and size rules.
Get the inline message for a rule if it exists.
Get the custom error message from the translator.
Check the given messages for a wildcard key.
Get the proper error message for an attribute and size rule.
Get the data type of the given attribute.
Replace all error message place-holders with actual values.
Get the displayable name of the attribute.
Get the given attribute from the attribute translations.
Replace the :attribute placeholder in the given message.
Replace the :input placeholder in the given message.
Get the displayable name of the value.
Transform an array of attributes to their displayable form.
Call a custom validator message replacer.
Call a class based validator message replacer.
Details
protected string
replaceAcceptedIf(string $message, string $attribute, string $rule, array $parameters)
Replace all place-holders for the accepted_if rule.
protected string
replaceDeclinedIf(string $message, string $attribute, string $rule, array $parameters)
Replace all place-holders for the declined_if rule.
protected string
replaceBetween(string $message, string $attribute, string $rule, array $parameters)
Replace all place-holders for the between rule.
protected string
replaceDateFormat(string $message, string $attribute, string $rule, array $parameters)
Replace all place-holders for the date_format rule.
protected string
replaceDifferent(string $message, string $attribute, string $rule, array $parameters)
Replace all place-holders for the different rule.
protected string
replaceDigits(string $message, string $attribute, string $rule, array $parameters)
Replace all place-holders for the digits rule.
protected string
replaceDigitsBetween(string $message, string $attribute, string $rule, array $parameters)
Replace all place-holders for the digits (between) rule.
protected string
replaceMin(string $message, string $attribute, string $rule, array $parameters)
Replace all place-holders for the min rule.
protected string
replaceMax(string $message, string $attribute, string $rule, array $parameters)
Replace all place-holders for the max rule.
protected string
replaceMultipleOf(string $message, string $attribute, string $rule, array $parameters)
Replace all place-holders for the multiple_of rule.
protected string
replaceIn(string $message, string $attribute, string $rule, array $parameters)
Replace all place-holders for the in rule.
protected string
replaceNotIn(string $message, string $attribute, string $rule, array $parameters)
Replace all place-holders for the not_in rule.
protected string
replaceInArray(string $message, string $attribute, string $rule, array $parameters)
Replace all place-holders for the in_array rule.
protected string
replaceRequiredArrayKeys(string $message, string $attribute, string $rule, array $parameters)
Replace all place-holders for the required_array_keys rule.
protected string
replaceMimetypes(string $message, string $attribute, string $rule, array $parameters)
Replace all place-holders for the mimetypes rule.
protected string
replaceMimes(string $message, string $attribute, string $rule, array $parameters)
Replace all place-holders for the mimes rule.
protected string
replaceRequiredWith(string $message, string $attribute, string $rule, array $parameters)
Replace all place-holders for the required_with rule.
protected string
replaceRequiredWithAll(string $message, string $attribute, string $rule, array $parameters)
Replace all place-holders for the required_with_all rule.
protected string
replaceRequiredWithout(string $message, string $attribute, string $rule, array $parameters)
Replace all place-holders for the required_without rule.
protected string
replaceRequiredWithoutAll(string $message, string $attribute, string $rule, array $parameters)
Replace all place-holders for the required_without_all rule.
protected string
replaceSize(string $message, string $attribute, string $rule, array $parameters)
Replace all place-holders for the size rule.
protected string
replaceGt(string $message, string $attribute, string $rule, array $parameters)
Replace all place-holders for the gt rule.
protected string
replaceLt(string $message, string $attribute, string $rule, array $parameters)
Replace all place-holders for the lt rule.
protected string
replaceGte(string $message, string $attribute, string $rule, array $parameters)
Replace all place-holders for the gte rule.
protected string
replaceLte(string $message, string $attribute, string $rule, array $parameters)
Replace all place-holders for the lte rule.
protected string
replaceRequiredIf(string $message, string $attribute, string $rule, array $parameters)
Replace all place-holders for the required_if rule.
protected string
replaceRequiredUnless(string $message, string $attribute, string $rule, array $parameters)
Replace all place-holders for the required_unless rule.
protected string
replaceProhibitedIf(string $message, string $attribute, string $rule, array $parameters)
Replace all place-holders for the prohibited_if rule.
protected string
replaceProhibitedUnless(string $message, string $attribute, string $rule, array $parameters)
Replace all place-holders for the prohibited_unless rule.
protected string
replaceProhibits(string $message, string $attribute, string $rule, array $parameters)
Replace all place-holders for the prohibited_with rule.
protected string
replaceSame(string $message, string $attribute, string $rule, array $parameters)
Replace all place-holders for the same rule.
protected string
replaceBefore(string $message, string $attribute, string $rule, array $parameters)
Replace all place-holders for the before rule.
protected string
replaceBeforeOrEqual(string $message, string $attribute, string $rule, array $parameters)
Replace all place-holders for the before_or_equal rule.
protected string
replaceAfter(string $message, string $attribute, string $rule, array $parameters)
Replace all place-holders for the after rule.
protected string
replaceAfterOrEqual(string $message, string $attribute, string $rule, array $parameters)
Replace all place-holders for the after_or_equal rule.
protected string
replaceDateEquals(string $message, string $attribute, string $rule, array $parameters)
Replace all place-holders for the date_equals rule.
protected string
replaceDimensions(string $message, string $attribute, string $rule, array $parameters)
Replace all place-holders for the dimensions rule.
protected string
replaceEndsWith(string $message, string $attribute, string $rule, array $parameters)
Replace all place-holders for the ends_with rule.
protected string
replaceStartsWith(string $message, string $attribute, string $rule, array $parameters)
Replace all place-holders for the starts_with rule.
protected string
getMessage(string $attribute, string $rule)
Get the validation message for an attribute and rule.
protected string|null
getInlineMessage(string $attribute, string $rule)
Get the proper inline error message for standard and size rules.
protected string|null
getFromLocalArray(string $attribute, string $lowerRule, array|null $source = null)
Get the inline message for a rule if it exists.
protected string
getCustomMessageFromTranslator(string $key)
Get the custom error message from the translator.
protected string
getWildcardCustomMessages(array $messages, string $search, string $default)
Check the given messages for a wildcard key.
protected string
getSizeMessage(string $attribute, string $rule)
Get the proper error message for an attribute and size rule.
protected string
getAttributeType(string $attribute)
Get the data type of the given attribute.
string
makeReplacements(string $message, string $attribute, string $rule, array $parameters)
Replace all error message place-holders with actual values.
string
getDisplayableAttribute(string $attribute)
Get the displayable name of the attribute.
protected string
getAttributeFromTranslations(string $name)
Get the given attribute from the attribute translations.
protected string
replaceAttributePlaceholder(string $message, string $value)
Replace the :attribute placeholder in the given message.
protected string
replaceInputPlaceholder(string $message, string $attribute)
Replace the :input placeholder in the given message.
string
getDisplayableValue(string $attribute, mixed $value)
Get the displayable name of the value.
protected array
getAttributeList(array $values)
Transform an array of attributes to their displayable form.
protected string|null
callReplacer(string $message, string $attribute, string $rule, array $parameters, Validator $validator)
Call a custom validator message replacer.
protected string
callClassBasedReplacer(string $callback, string $message, string $attribute, string $rule, array $parameters, Validator $validator)
Call a class based validator message replacer.