FormatsMessages
Methods
getMessage ( $attribute , $rule ) : string
Get the validation message for an attribute and rule.
Parameters
- $attribute string
- $rule string
getInlineMessage ( $attribute , $rule ) : string|null
Get the proper inline error message for standard and size rules.
Parameters
- $attribute string
- $rule string
getFromLocalArray ( $attribute , $lowerRule , $source ) : string|null
Get the inline message for a rule if it exists.
Parameters
- $attribute string
- $lowerRule string
- $source array|null
getCustomMessageFromTranslator ( $keys ) : string
Get the custom error message from the translator.
Parameters
- $keys array|string
getWildcardCustomMessages ( $messages , $search , $default ) : string
Check the given messages for a wildcard key.
Parameters
- $messages array
- $search string
- $default string
getSizeMessage ( $attribute , $rule ) : string
Get the proper error message for an attribute and size rule.
Parameters
- $attribute string
- $rule string
getAttributeType ( $attribute ) : string
Get the data type of the given attribute.
Parameters
- $attribute string
makeReplacements ( $message , $attribute , $rule , $parameters ) : string
Replace all error message place-holders with actual values.
Parameters
- $message string
- $attribute string
- $rule string
- $parameters array
getDisplayableAttribute ( $attribute ) : string
Get the displayable name of the attribute.
Parameters
- $attribute string
getAttributeFromTranslations ( $name ) : string
Get the given attribute from the attribute translations.
Parameters
- $name string
replaceAttributePlaceholder ( $message , $value ) : string
Replace the :attribute placeholder in the given message.
Parameters
- $message string
- $value string
replaceIndexPlaceholder ( $message , $attribute ) : string
Replace the :index placeholder in the given message.
Parameters
- $message string
- $attribute string
replacePositionPlaceholder ( $message , $attribute ) : string
Replace the :position placeholder in the given message.
Parameters
- $message string
- $attribute string
replaceIndexOrPositionPlaceholder ( $message , $attribute , $placeholder , Closure $modifier ) : string
Replace the :index or :position placeholder in the given message.
Parameters
- $message string
- $attribute string
- $placeholder string
- $modifier Closure |null
numberToIndexOrPositionWord ( int $value ) : string
Get the word for a index or position segment.
Parameters
- $value int
replaceInputPlaceholder ( $message , $attribute ) : string
Replace the :input placeholder in the given message.
Parameters
- $message string
- $attribute string
getDisplayableValue ( $attribute , $value ) : string
Get the displayable name of the value.
Parameters
- $attribute string
- $value mixed
getAttributeList ( array $values ) : array
Transform an array of attributes to their displayable form.
Parameters
- $values array
callReplacer ( $message , $attribute , $rule , $parameters , $validator ) : string|null
Call a custom validator message replacer.
Parameters
- $message string
- $attribute string
- $rule string
- $parameters array
- $validator Validator
callClassBasedReplacer ( $callback , $message , $attribute , $rule , $parameters , $validator ) : string
Call a class based validator message replacer.
Parameters
- $callback string
- $message string
- $attribute string
- $rule string
- $parameters array
- $validator Validator