Class Phalcon\Validation\Message

Encapsulates validation info generated in the validation process

Methods

public __construct (string $message, [string $field], [string $type], [int $code])

Phalcon\Validation\Message constructor

public Phalcon\Validation\Message setType (string $type)

Sets message type

public string getType ()

Returns message type

public Phalcon\Validation\Message setCode (string $code)

Sets message code

public string getCode ()

Returns message code

public Phalcon\Validation\Message setMessage (string $message)

Sets verbose message

public string getMessage ()

Returns verbose message

public Phalcon\Validation\Message setField (string $field)

Sets field name related to message

public string getField ()

Returns field name related to message

public string __toString ()

Magic __toString method returns verbose message

public static Phalcon\Validation\Message __set_state (array $message)

Magic __set_state helps to recover messsages from serialization

© 2011–2016 Phalcon Framework Team
Licensed under the Creative Commons Attribution License 3.0.
https://docs.phalconphp.com/en/2.0.0/api/Phalcon_Validation_Message.html