empty strings shouldn't be validated by complex validations

This commit is contained in:
Andreas Billmann
2015-12-18 01:53:29 +01:00
parent 9b8b0080ff
commit 8d0073f1bc

View File

@@ -87,7 +87,7 @@ public class Validator {
ValidationError error = ValidationError.withLineNumber(lineNumber); ValidationError error = ValidationError.withLineNumber(lineNumber);
checkBlankOrNull(columnConfig, value, error); checkBlankOrNull(columnConfig, value, error);
if (value != null) { if (value != null && !value.isEmpty()) {
checkRegularExpression(columnConfig, value, error); checkRegularExpression(columnConfig, value, error);
checkAlphaNumeric(columnConfig, value, error); checkAlphaNumeric(columnConfig, value, error);
checkDate(columnConfig, value, error); checkDate(columnConfig, value, error);