Packageorg.granite.validation
Classpublic class ConstraintViolation
SubclassesServerConstraintViolation

Represents a constraint violation.



Public Properties
 PropertyDefined by
  constraint : IConstraint
[read-only] The IConstraint that failed.
ConstraintViolation
  invalidValue : *
[read-only] The value of the invalid property.
ConstraintViolation
  leafBean : *
[read-only] The leaf bean type of the invalid property.
ConstraintViolation
  message : String
[read-only] The error message, with all parameters resolved by the current message interpolator.
ConstraintViolation
  messageKey : String
[read-only] The raw error message key.
ConstraintViolation
  property : *
[read-only] The property name (fields), index (collections) or key (map) of the invalid property.
ConstraintViolation
  propertyPath : IPath
[read-only] The path from the root bean to the invalid property.
ConstraintViolation
  rootBean : *
[read-only] The root bean of the invalid property.
ConstraintViolation
  rootBeanType : *
[read-only] The root bean type of the invalid property.
ConstraintViolation
Public Methods
 MethodDefined by
  
ConstraintViolation(messageKey:String, constraint:IConstraint, rootBean:IPath, rootBeanType:*, propertyPath:*, leafBean:*, invalidValue:*)
Constructs a new ConstraintViolation instance.
ConstraintViolation
  
toString():String
Returns the message property of this ConstraintViolation instance.
ConstraintViolation
Property detail
constraintproperty
constraint:IConstraint  [read-only]

The IConstraint that failed.

Implementation
    public function get constraint():IConstraint
invalidValueproperty 
invalidValue:*  [read-only]

The value of the invalid property.

Implementation
    public function get invalidValue():*
leafBeanproperty 
leafBean:*  [read-only]

The leaf bean type of the invalid property.

Implementation
    public function get leafBean():*
messageproperty 
message:String  [read-only]

The error message, with all parameters resolved by the current message interpolator.

Implementation
    public function get message():String

See also

messageKeyproperty 
messageKey:String  [read-only]

The raw error message key.

Implementation
    public function get messageKey():String
propertyproperty 
property:*  [read-only]

The property name (fields), index (collections) or key (map) of the invalid property.

Implementation
    public function get property():*
propertyPathproperty 
propertyPath:IPath  [read-only]

The path from the root bean to the invalid property.

Implementation
    public function get propertyPath():IPath
rootBeanproperty 
rootBean:*  [read-only]

The root bean of the invalid property.

Implementation
    public function get rootBean():*
rootBeanTypeproperty 
rootBeanType:*  [read-only]

The root bean type of the invalid property.

Implementation
    public function get rootBeanType():*
Constructor detail
ConstraintViolation()constructor
public function ConstraintViolation(messageKey:String, constraint:IConstraint, rootBean:IPath, rootBeanType:*, propertyPath:*, leafBean:*, invalidValue:*)

Constructs a new ConstraintViolation instance.

Parameters
messageKey:String — the error message key to be used for message interpolation.
 
constraint:IConstraint — the IConstraint that failed.
 
rootBean:IPath — the root bean of the invalid property.
 
rootBeanType:* — the root bean type of the invalid property.
 
propertyPath:* — the path from the root bean to the invalid property.
 
leafBean:* — the leaf bean of the invalid property.
 
invalidValue:* — the value of the invalid property.

See also

Method detail
toString()method
public function toString():String

Returns the message property of this ConstraintViolation instance.

Returns
String — the message property of this ConstraintViolation instance.

See also