|
ColdBox Platform v3.8.0 | ||||
FRAMES |
WEB-INF.cftags.componentcoldbox.system.validation.validators.UniqueValidator
public class UniqueValidator
******************************************************************************* Copyright Since 2005 ColdBox Framework by Luis Majano and Ortus Solutions, Corp www.coldbox.org | www.luismajano.com | www.ortussolutions.com ******************************************************************************* Validates if the field has a unique value in the database, this only applies to ORM objects
Property Summary | ||||
---|---|---|---|---|
Type | Property & Description | Default | Serializable | Required |
any
|
ORMService
Attributes: |
|
true
|
false
|
any
|
name
Attributes: |
|
true
|
false
|
Constructor Summary | |
---|---|
init()
|
Method Summary | |
---|---|
any |
GETORMSERVICE()
|
UniqueValidator |
SETNAME(any name)
|
UniqueValidator |
SETORMSERVICE(any ORMService)
|
string |
getName()
Get the name of the validator |
boolean |
validate(IValidationResult validationResult, any target, string field, [any targetValue], [any validationData])
Will check if an incoming value validates |
Methods inherited from class WEB-INF.cftags.component |
---|
None
|
Constructor Detail |
---|
public init()
Property Detail |
---|
any ORMService
default
- serializable
- truerequired
- falseany name
default
- serializable
- truerequired
- falseMethod Detail |
---|
public any GETORMSERVICE()
public UniqueValidator SETNAME(any name)
name
public UniqueValidator SETORMSERVICE(any ORMService)
ORMService
public string getName()
getName
in interface
IValidator
public boolean validate(IValidationResult validationResult, any target, string field, [any targetValue], [any validationData])
validate
in interface
IValidator
validationResult
- The result object of the validationtarget
- The target object to validate onfield
- The field on the target object to validate ontargetValue
- The target value to validatevalidationData
- The validation data the validator was created with
|
ColdBox Platform v3.8.0 | ||||
FRAMES |