Class BicValidator
- java.lang.Object
-
- de.knightsoftnet.validators.shared.impl.BicValidator
-
- All Implemented Interfaces:
HasSetIbanLengthMapSharedConstants,javax.validation.ConstraintValidator<Bic,Object>
public class BicValidator extends Object implements javax.validation.ConstraintValidator<Bic,Object>, HasSetIbanLengthMapSharedConstants
Check a string if it's a valid BIC.- Author:
- Manfred Tremmel
-
-
Field Summary
Fields Modifier and Type Field Description static intBIC_LENGTH_MAXdefinition of BIC length maximum.static intBIC_LENGTH_MINdefinition of BIC length minimum.static StringBIC_REGEXregular expression to check bic value.
-
Constructor Summary
Constructors Constructor Description BicValidator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidinitialize(Bic pconstraintAnnotation)initialize the validator.booleanisValid(Object pvalue, javax.validation.ConstraintValidatorContext pcontext)check if given string is a valid BIC.voidsetIbanLengthMapSharedConstants(IbanLengthMapSharedConstants ibanLengthMapSharedConstants)setter for iban length shared constants.
-
-
-
Field Detail
-
BIC_LENGTH_MIN
public static final int BIC_LENGTH_MIN
definition of BIC length minimum.- See Also:
- Constant Field Values
-
BIC_LENGTH_MAX
public static final int BIC_LENGTH_MAX
definition of BIC length maximum.- See Also:
- Constant Field Values
-
BIC_REGEX
public static final String BIC_REGEX
regular expression to check bic value.- See Also:
- Constant Field Values
-
-
Method Detail
-
initialize
public final void initialize(Bic pconstraintAnnotation)
initialize the validator.
-
setIbanLengthMapSharedConstants
public void setIbanLengthMapSharedConstants(IbanLengthMapSharedConstants ibanLengthMapSharedConstants)
Description copied from interface:HasSetIbanLengthMapSharedConstantssetter for iban length shared constants.- Specified by:
setIbanLengthMapSharedConstantsin interfaceHasSetIbanLengthMapSharedConstants- Parameters:
ibanLengthMapSharedConstants- value to set
-
isValid
public final boolean isValid(Object pvalue, javax.validation.ConstraintValidatorContext pcontext)
check if given string is a valid BIC.
-
-