Unique

Navigation:  Development > Function Reference > Helpers > Validation >

Unique

Previous pageReturn to chapter overviewNext page

Check Unique value in a Model

 

App::Utility()->Unique(Value, Options)

 

Parameter

Description

Value

Value to check

Options

Define Model and file to check.
'model' to set model name and 'field" to table field name.

 

 

See bellow example: 

 
$return = App::Helper('Validation')
    ->Unique(
        'test@example.com',
        array(
            'model'=>'Admin',
            'field'=>'email'
        )
    );