Пример #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);
 }
Пример #2
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");
   }
 }
Пример #3
0
 public void validateIdentity(ValidationContext result) {
   if (!NumberUtils.isValidIdentifier(getIdentity())) {
     result.addError("identity", "Identifier does not allow special characters");
   }
 }
Пример #4
0
 public void validateValues(ValidationContext result) {
   if (_has(VALUES)) {
     result.validateChilds("Values", getValues());
   }
 }