W3cubDocs

/Phalcon 3

Class Phalcon\Validation\Message

implements Phalcon\Validation\MessageInterface

Source on GitHub

Encapsulates validation info generated in the validation process

Methods

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

Phalcon\Validation\Message constructor

public setType (mixed $type)

Sets message type

public getType ()

Returns message type

public setMessage (mixed $message)

Sets verbose message

public getMessage ()

Returns verbose message

public setField (mixed $field)

Sets field name related to message

public mixed getField ()

Returns field name related to message

public setCode (mixed $code)

Sets code for the message

public getCode ()

Returns the message code

public __toString ()

Magic __toString method returns verbose message

public static __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/latest/api/Phalcon_Validation_Message.html