in src/main/java/org/apache/nifi/processor/util/StandardValidators.java [115:132]
public ValidationResult validate(final String subject, final String value, final ValidationContext context) {
if (context.isExpressionLanguageSupported(subject) && context.isExpressionLanguagePresent(value)) {
return new ValidationResult.Builder().subject(subject).input(value).explanation("Expression Language Present").valid(true).build();
}
String reason = null;
try {
final long longVal = Long.parseLong(value);
if (longVal <= 0) {
reason = "not a positive value";
}
} catch (final NumberFormatException e) {
reason = "not a valid 64-bit integer";
}
return new ValidationResult.Builder().subject(subject).input(value).explanation(reason).valid(reason == null).build();
}