PHP Class Webiny\Component\Entity\Attribute\Validation\ValidationException

Inheritance: extends Webiny\Component\StdLib\Exception\AbstractException, implements IteratorAggregate
Afficher le fichier Open project: Webiny/Framework Class Usage Examples

Protected Properties

Свойство Type Description
$attribute
$errors
$messages

Méthodes publiques

Méthode Description
addError ( string $key, string | integer $message, null | array $params = null ) Add error for given key
getIterator ( ) : Traversable Retrieve an external iterator
setAttribute ( null $attribute )
setMessage ( $message )

Method Details

addError() public méthode

This is useful when you are validating an array attribute which can have validators on every nested key. When validating a simple attribute with no nested values, use this method to set error message for the attribute itself.
public addError ( string $key, string | integer $message, null | array $params = null )
$key string Attribute name or nested attribute key
$message string | integer
$params null | array

getIterator() public méthode

Retrieve an external iterator
public getIterator ( ) : Traversable
Résultat Traversable An instance of an object implementing Iterator or Traversable

setAttribute() public méthode

public setAttribute ( null $attribute )
$attribute null

setMessage() public méthode

public setMessage ( $message )

Property Details

$attribute protected_oe property

protected $attribute

$errors protected_oe property

protected $errors

$messages protected_oe static_oe property

protected static $messages