mirror of
https://github.com/frosch95/SmartCSV.fx.git
synced 2026-04-11 13:38:23 +02:00
first version of new validation algorithm, that is a lot faster
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
package ninja.javafx.smartcsv.validation;
|
||||
|
||||
import static org.apache.commons.validator.GenericValidator.isDouble;
|
||||
|
||||
/**
|
||||
* Created by abi on 07.08.2016.
|
||||
*/
|
||||
public class DoubleValidation implements Validation {
|
||||
|
||||
@Override
|
||||
public void check(int row, String value, ValidationError error) {
|
||||
if (!isDouble(value)) {
|
||||
error.add("validation.message.double");
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public Type getType() {
|
||||
return Type.DOUBLE;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user