contentbox.models.validators

Class UniqueSiteFieldValidator

lucee.Component
    extended by contentbox.models.validators.UniqueSiteFieldValidator

Copyright Since 2005 ColdBox Framework by Luis Majano and Ortus Solutions, Corp www.ortussolutions.com --- Validates if the field has a unique value by site in the database, this only applies to ORM objects

Class Attributes:
  • singleton
  •  
  • synchronized : false
  •  
  • accessors : true
  •  
  • persistent : false
  •  
    Property Summary
    type property default serializable required
    any name


    • access = public
    • returntype = any
    true false
    any ormService


    • access = public
    • returntype = any
    true false
    Constructor Summary
    init()
          Constructor.
    Method Summary
    string getName()
         Get the name of the validator.
    string getOrmService()
    any setName(any name)
    any setOrmService(any ormService)
    boolean validate(any validationResult, any target, string field, [any targetValue], [any validationData])
         Will check if an incoming value validates.
     
    Methods inherited from class lucee.Component
    None

    Constructor Detail

    init

    public init()

    Constructor


    Property Detail

    name

    property any name

    Attributes:
    access - public
    required - false
    returntype - any
    serializable - true

    ormService

    property any ormService

    Attributes:
    access - public
    required - false
    returntype - any
    serializable - true

    Method Detail

    getName

    public string getName()

    Get the name of the validator


    getOrmService

    public string getOrmService()


    setName

    public any setName(any name)

    Parameters:
    name

    setOrmService

    public any setOrmService(any ormService)

    Parameters:
    ormService

    validate

    public boolean validate(any validationResult, any target, string field, [any targetValue], [any validationData])

    Will check if an incoming value validates

    Parameters:
    validationResult - The result object of the validation
    target - The target object to validate on
    field - The field on the target object to validate on
    targetValue - The target value to validate
    validationData - The validation data the validator was created with