Exemplo n.º 1
0
 public void _validate(ValidationContext result) {
   validateValues(result);
   validateNameSpace(result);
   if ((_isNew() || isidentityChanged()) && (DataUtil.equals(getIdentity(), null))) {
     result.addError("identity", messages().required("Value"));
   } else {
     validateIdentity(result);
   }
   if (_has(VALUES)) {
     result.validateReference("values", getValues());
   }
   _validateUniqueSettings(result);
 }
Exemplo n.º 2
0
 public void validateIdentity(ValidationContext result) {
   if (!NumberUtils.isValidIdentifier(getIdentity())) {
     result.addError("identity", "Identifier does not allow special characters");
   }
 }
Exemplo n.º 3
0
 public void validateNameSpace(ValidationContext result) {
   if ((!DataUtil.equals(getNameSpace(), null)) && (getNameSpace().length() > 255)) {
     result.addError("nameSpace", "Length is exceed, You should enter 255 characters only");
   }
 }