Show:

ValidationError Class

Defined in: a25_validate.js:890
Module: breeze

A ValidationError is used to describe a failed validation.

Methods

<ctor> ValidationError

(
  • validator
  • context
  • errorMessage
  • [key]
)

Defined in a25_validate.js:896

Constructs a new ValidationError

Parameters:

  • validator Validator | | null

    The Validator used to create this error, if any.

  • context ContextObject | | null

    The Context object used in conjunction with the Validator to create this error.

  • errorMessage String

    The actual error message

  • [key] String optional

    An optional key used to define a key for this error. One will be created automatically if not provided here.

getKey

(
  • validator
  • [propertyName]
)
String static

Defined in a25_validate.js:976

Composes a ValidationError 'key' given a validator or an errorName and an optional propertyName

Parameters:

  • validator ValidatorOrErrorKey

    A Validator or an "error name" if no validator is available.

  • [propertyName] Object optional

    A property name

Returns:

String:

A ValidationError 'key'

Properties

context

Object

Defined in a25_validate.js:933

A 'context' object associated with this ValidationError.

readOnly

errorMessage

String

Defined in a25_validate.js:954

The error message associated with the ValidationError.

readOnly

isServerError

Bool

Defined in a25_validate.js:968

Whether this is a server error.

readOnly

key

String

Defined in a25_validate.js:961

The key by which this validation error may be removed from a collection of ValidationErrors.

readOnly

property

DataProperty | NavigationProperty

Defined in a25_validate.js:940

The DataProperty or NavigationProperty associated with this ValidationError.

readOnly

propertyName

String

Defined in a25_validate.js:947

The property name associated with this ValidationError. This will be a "property path" for any properties of a complex object.

readOnly

validator

Validator

Defined in a25_validate.js:926

The Validator associated with this ValidationError.

readOnly