com.projectnine.csvmapper
Class RegularExpressionCsvFieldValidator
java.lang.Object
com.projectnine.csvmapper.CsvFieldValidator
com.projectnine.csvmapper.RegularExpressionCsvFieldValidator
- All Implemented Interfaces:
- org.apache.commons.chain.Command
public class RegularExpressionCsvFieldValidator
- extends CsvFieldValidator
Give this CsvFieldValidator
one or more regular expressions, and it
will not allow a String that fails any of them to pass validation.
- Author:
- robweber
Fields inherited from interface org.apache.commons.chain.Command |
CONTINUE_PROCESSING, PROCESSING_COMPLETE |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
RegularExpressionCsvFieldValidator
public RegularExpressionCsvFieldValidator()
setRegularExpressions
public void setRegularExpressions(java.util.List<java.lang.String> regularExpressions)
- Parameters:
regularExpression
- the regularExpression to set
setRegularExpression
public void setRegularExpression(java.lang.String regularExpression)
doValidate
protected boolean doValidate(CsvFieldValidationContext csvFieldValidationContext)
throws java.lang.Exception
- Specified by:
doValidate
in class CsvFieldValidator
- Throws:
java.lang.Exception
Copyright © 2008. All Rights Reserved.