PHP Interface Stevemo\Cpanel\Services\Validation\ValidableInterface

Datei anzeigen Open project: stevemo/cpanel Interface Usage Examples

Public Methods

Method Description
add ( string $key, string $message ) Add a message to the bag.
errors ( ) : Illuminate\Support\MessageBag Retrieve validation errors
getData ( ) : array Get the stored data
passes ( ) : boolean Test if validation passes
validForCreate ( ) : boolean Test if validation passes before create
validForUpdate ( ) : boolean Test if validation passes before update
with ( array $input ) Add data to validation against

Method Details

add() public method

Add a message to the bag.
Author: Steve Montambeault
public add ( string $key, string $message )
$key string
$message string

errors() public method

Retrieve validation errors
Author: Steve Montambeault
public errors ( ) : Illuminate\Support\MessageBag
return Illuminate\Support\MessageBag

getData() public method

Get the stored data
Author: Steve Montambeault
public getData ( ) : array
return array

passes() public method

Test if validation passes
Author: Steve Montambeault
public passes ( ) : boolean
return boolean

validForCreate() public method

Test if validation passes before create
Author: Steve Montambeault
public validForCreate ( ) : boolean
return boolean

validForUpdate() public method

Test if validation passes before update
Author: Steve Montambeault
public validForUpdate ( ) : boolean
return boolean

with() public method

Add data to validation against
Author: Steve Montambeault
public with ( array $input )
$input array