-
Sub-task
-
Resolution: Unresolved
-
Major
-
2.5.0.Final
-
None
With FORGE-1616 I can now create my own constraint. For example, this is the way I create an ISBN constraint :
constraint-new-annotation --named ISBN
The constraint is created, by default, under the constraint package. Now the problem, is that I can't apply it to a property because the constraint is not known. If I add a constraint, and press TAB for completion, ISBN does not appear :
[Book.java]$ constraint-add --onProperty isbn --constraint TAB Valid Null NotNull AssertTrue AssertFalse Min Max DecimalMin DecimalMax Size Digits Past Future Pattern
Even if I try to add the location of the constraint, it does not work :
[Book.java]$ constraint-add --onProperty isbn --constraint ../constraints/ISBN [0] - Valid [1] - Null [2] - NotNull [3] - AssertTrue [4] - AssertFalse [5] - Min [6] - Max [7] - DecimalMin [8] - DecimalMax [9] - Size [10] - Digits [11] - Past [12] - Future [13] - Pattern ***ERROR*** Constraint must be specified.