The ValidatorContext represents the current state and setting for the validator. It also contains an attributes map that allows validators to pass or share state, as well as the following properties:

Property

Description

allowableUnknown
  PropertyName

Obtains the names of properties that are not defined in the schema and should not cause validation errors.

applyUpdatesToTarget

If set to true, the target is updated with the changes in the property value.

attributes

Returns any extra property attributes.

create

If the validation is for a create call, set this property to true. The default is false.

defaultErrorCode

Identifies the default error code.

errorCount

This read only property provides a count of the validation errors or exceptions encountered during validation.

errors

List of error or exceptions encountered during validation.

fetchValueForCopy

If set to true, obtains the value to copy for a property.

filter

Returns a list of properties filters to include or exclude.

filterForInclude

Identifies if the filter includes or excludes data. The default is false, indicating that the filter excludes data.

modifiedValue

Indicates if a value was updated.

nullOutPresent
  ButNullProperties

Identifies if target properties should be set to null if a source property is present in a source map or object.

pagentCount

Obtains a count of the number of parents.

parentSrc

The source parent stack that is being updated. Note: This property should be modified only by methods of this class.

propertyPath

The property path that leads to the current parent.

propertyValueChange
  Listeners

Identifies listeners that are notified when properties change.

repositoryItemHelper

Identifies and sets a repository item helper.

shouldRecurse

Indicates if validation should recurse into validators for sub-properties.

sourceUsesExternal
  PropertyNames

Indicates if the validation or update source uses external property names.

treatUnknownProperties
  AsErrors

Identifies whether to treat unknown properties in the input data as errors.

updating

Indicates if an update is in progress. If set to false, it indicates that a validation is occurring.

updateMode

Controls whether the update mode is:

COMPLETE – All properties should be present. Properties that can be updated but are unset are considered null, and collections and maps are trimmed down to match the input.

SPARSE –Properties that can be are updated. All other properties are left untouched. SPARSE only updates properties that exist in the source.

HYBRID (merged) – Most input can be identified as SPARSE, with the exception of lists and maps, which must contain enough information to identify existing items.

validateExisting
  Properties

Indicates if existing properties should be validated.

validatorListeners

Identifies a list of validator listeners.

For additional information on validation classes and components, refer to the ATG Platform API Reference.


Copyright © 1997, 2017 Oracle and/or its affiliates. All rights reserved. Legal Notices