max

Purpose

Ensures a value does not exceed the given maximum value.

Examples

age(max:new Date())
price(max:999F)

Description

Sets the maximum value of a class that implements java.lang.Comparable. The same type needs to be used as the property itself. This constraint influences schema generation.

Error Code: className.propertyName.max.exceeded