long numeric;
try {
numeric = Long.parseLong(value);
} catch (Exception e) {
throw new ValidationException($("Field should contain long integer value"));
}
if (numeric < minimalValue) {
throw new ValidationException($("Field should be at least {0}", minimalValue));
}
if (numeric > maximalValue) {
throw new ValidationException($("Field should be no more than {0}", maximalValue));
}
}