mirror of
https://github.com/frosch95/SmartCSV.fx.git
synced 2026-04-11 13:38:23 +02:00
support double value validation
This commit is contained in:
@@ -96,6 +96,7 @@ public class Validator {
|
||||
checkInteger(columnConfig, value, error);
|
||||
checkGroovy(column, columnConfig, value, error);
|
||||
checkValueOf(columnConfig, value, error);
|
||||
checkDouble(columnConfig, value, error);
|
||||
}
|
||||
|
||||
if (!error.isEmpty()) {
|
||||
@@ -174,6 +175,15 @@ public class Validator {
|
||||
}
|
||||
}
|
||||
|
||||
private void checkDouble(Config columnConfig, String value, ValidationError error) {
|
||||
if (getBoolean(columnConfig, "double")) {
|
||||
if (!isDouble(value)) {
|
||||
error.add("validation.message.double");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private void checkMinLength(Config columnConfig, String value, ValidationError error) {
|
||||
Integer minLength = getInteger(columnConfig, "minlength");
|
||||
if (minLength != null) {
|
||||
|
||||
Reference in New Issue
Block a user