# Validation.push_error!Function.

push_error!{T<:AbstractModel}(m::T, field::Symbol, error::Symbol, error_message::AbstractString) :: Bool

Pushes the error and its corresponding error_message to the errors stack of the validator of the model m for the field field.

source

# Validation.clear_errors!Function.

clear_errors!{T<:AbstractModel}(m::T) :: Void

Clears all the errors associated with the validator of m.

source

# Validation.validate!Function.

validate!{T<:AbstractModel}(m::T) :: Bool

Validates m's data. A bool is return and existing errors are pushed to the validator's error stack.

source

# Validation.rules!!Function.

rules!!{T<:AbstractModel}(m::T) :: Vector{Tuple{Symbol,Function,Vararg{Any}}}

Returns the vector of validation rules. An error is thrown if no validator is defined.

source

# Validation.rulesFunction.

rules{T<:AbstractModel}(m::T) :: Nullable{Vector{Tuple{Symbol,Function,Vararg{Any}}}}

Returns the vector of validation rules wrapped in a Nullable.

source

# Validation.errors!!Function.

errors!!{T<:AbstractModel}(m::T) :: Vector{Tuple{Symbol,Symbol,String}}

Returns the vector of validation errors. An error is thrown if no validator is defined.

source

# Validation.errorsFunction.

errors{T<:AbstractModel}(m::T) :: Nullable{Vector{Tuple{Symbol,Symbol,String}}}

Returns the vector of validation errors wrapped in a Nullable.

source

# Validation.validator!!Function.

validator!!{T<:AbstractModel}(m::T) :: ModelValidator

Returns the ModelValidator instance associated with m. Errors if no validator is defined.

source

# Validation.validatorFunction.

validator{T<:AbstractModel}(m::T) :: Nullable{ModelValidator}

m's validator, wrapped in a Nullable.

source

# Validation.has_validatorFunction.

has_validator{T<:AbstractModel}(m::T) :: Bool

Whether or not m has a validator defined.

source

# Validation.has_errorsFunction.

has_errors{T<:AbstractModel}(m::T) :: Bool

Whether or not m has validation errors.

source

# Validation.has_errors_forFunction.

has_errors_for{T<:AbstractModel}(m::T, field::Symbol) :: Bool

True if m.field has validation errors.

source

# Validation.is_validFunction.

is_valid{T<:AbstractModel}(m::T) :: Bool

Returns true if m has no validation errors.

source

# Validation.errors_forFunction.

errors_for{T<:AbstractModel}(m::T, field::Symbol) :: Vector{Tuple{Symbol,Symbol,AbstractString}}

The vector of validation errors corresponding to m.field.

source

# Validation.errors_messages_forFunction.

errors_messages_for{T<:AbstractModel}(m::T, field::Symbol) :: Vector{AbstractString}

Vector of error messages corresponding to the validation errors of m.field.

source

# Validation.errors_to_stringFunction.

errors_to_string{T<:AbstractModel}(m::T, field::Symbol, separator = "

"; upper_case_first = false) :: String

Concatenates the validation errors of m.field into a single string – meant to be displayed easily to end users.

source