class MinValidatorForString implements ConstraintValidator<Min, String> {

	public boolean isValid(String value, ConstraintValidatorContext constraintValidatorContext) {
		//null values are valid
		if ( value == null ) {
			return true;
		}
		try {
			return new BigDecimal( ( String ) value ).compareTo( BigDecimal.valueOf( minValue ) ) != -1;
		}
		catch ( NumberFormatException nfe ) {
			return false;
		}
	}

}