coldbox.system.validation.result

Class ValidationError

WEB-INF.cftags.component
        extended by coldbox.system.validation.result.ValidationError
Class Attributes:
  • accessors : true
  •  
    All Implemented Interfaces:
    IValidationError
    Constructor Summary
    init()
    Method Summary
    IValidationError configure(string message, string field, [string rejectedValue], [string validationType], [any validationData])
         Configure method, which can do setters for all required error params.
    struct getErrorMetadata()
         Get the error metadata.
    string getField()
         Get the error field.
    struct getMemento()
         Get the error representation.
    string getMessage()
         Get the error message.
    any getRejectedValue()
         Get the rejected value.
    string getValidationData()
         Get the error validation data.
    string getValidationType()
         Get the error validation type.
    IValidationError setErrorMetadata(any data)
         Set error metadata that can be used in i18n message replacements or in views.
    IValidationError setField(string field)
         Set the field.
    IValidationError setMessage(string message)
         Set the error message.
    IValidationError setRejectedValue(any value)
         Set the rejected value.
    IValidationError setValidationData(any data)
         Set the validator data.
    IValidationError setValidationType(any validationType)
         Set the validator type name that rejected.
     
    Methods inherited from class WEB-INF.cftags.component
    None

    Constructor Detail

    init

    public init()


    Method Detail

    configure

    public IValidationError configure(string message, string field, [string rejectedValue], [string validationType], [any validationData])

    Configure method, which can do setters for all required error params

    Parameters:
    message - The required error message
    field - The required field that case the exception
    rejectedValue - The optional rejected value
    validationType - The name of the rejected validator
    validationData

    getErrorMetadata

    public struct getErrorMetadata()

    Get the error metadata


    getField

    public string getField()

    Get the error field

    Specified by:
    getField in interface IValidationError

    getMemento

    public struct getMemento()

    Get the error representation


    getMessage

    public string getMessage()

    Get the error message

    Specified by:
    getMessage in interface IValidationError

    getRejectedValue

    public any getRejectedValue()

    Get the rejected value

    Specified by:
    getRejectedValue in interface IValidationError

    getValidationData

    public string getValidationData()

    Get the error validation data

    Specified by:
    getValidationData in interface IValidationError

    getValidationType

    public string getValidationType()

    Get the error validation type

    Specified by:
    getValidationType in interface IValidationError

    setErrorMetadata

    public IValidationError setErrorMetadata(any data)

    Set error metadata that can be used in i18n message replacements or in views

    Parameters:
    data - The name-value pairs of data to store in this error.

    setField

    public IValidationError setField(string field)

    Set the field

    Specified by:
    setField in interface IValidationError
    Parameters:
    field

    setMessage

    public IValidationError setMessage(string message)

    Set the error message

    Specified by:
    setMessage in interface IValidationError
    Parameters:
    message - The error message

    setRejectedValue

    public IValidationError setRejectedValue(any value)

    Set the rejected value

    Specified by:
    setRejectedValue in interface IValidationError
    Parameters:
    value - The rejected value

    setValidationData

    public IValidationError setValidationData(any data)

    Set the validator data

    Specified by:
    setValidationData in interface IValidationError
    Parameters:
    data - The data of the validator

    setValidationType

    public IValidationError setValidationType(any validationType)

    Set the validator type name that rejected

    Specified by:
    setValidationType in interface IValidationError
    Parameters:
    validationType - The name of the rejected validator