Maslosoft Mangan API
Class UniqueValidatorAnnotation
UniqueValidator
- Maslosoft\Addendum\Collections\MetaAnnotation
- Maslosoft\Mangan\Meta\ManganAnnotation
- Maslosoft\Mangan\Meta\ManganPropertyAnnotation
- Maslosoft\Mangan\Annotations\Validators\ValidatorAnnotation
- Maslosoft\Mangan\Annotations\Validators\UniqueValidatorAnnotation uses Maslosoft\Mangan\Validators\Traits\AllowEmpty
Author: Piotr Maselkowski
Located at Annotations/Validators/UniqueValidatorAnnotation.php
Methods inherited from Maslosoft\Mangan\Meta\ManganPropertyAnnotation
Methods inherited from Maslosoft\Mangan\Meta\ManganAnnotation
Constants summary
Constants inherited from Maslosoft\Mangan\Annotations\Validators\ValidatorAnnotation
Properties summary
public
string
|
$className
the ActiveRecord class name that should be used to look for the attribute value being validated. Defaults to null, meaning using the class of the object currently being validated. You may use path alias to reference a class name here. |
|
public
string
|
$attributeName
the ActiveRecord class attribute name that should be used to look for the attribute value being validated. Defaults to null, meaning using the name of the attribute being validated. |
|
public
array
|
$criteria
additional query criteria. This will be combined with the condition that checks if the attribute value exists in the corresponding table column. This array will be used to instantiate a Criteria object. |
|
public
string
|
$message
the user-defined error message. The placeholders "{attribute}" and "{value}" are recognized, which will be replaced with the actual attribute name and value, respectively. |