public void validate(String value, String field, Context context) {
if (value != null) {
try {
Long.parseLong(value);
} catch (NumberFormatException e) {
<BUG>context.getValidation().addViolation(ConstraintViolation
.createForFieldWithDefault(this.isInteger.key(),
fieldKey(field, this.isInteger.fieldKey()),</BUG>
this.isInteger.message(), value));
}

public void validate(String value, String field, Context context) {
if (value != null) {
if (this.length.max() != -1 && value.length() > this.length.max()) {
context.getValidation().addViolation(
new ConstraintViolation(this.length.maxKey(),
fieldKey(field, this.length.fieldKey()),
this.length.maxMessage(), this.length.max(), value));
} else if (this.length.min() != -1 && value.length() < this.length.min()) {
context.getValidation().addViolation(
new ConstraintViolation(this.length.minKey(),
fieldKey(field, this.length.fieldKey()),
this.length.minMessage(), this.length.min(), value));
