class RuleValidator {

    public boolean validateFieldInline(String value,
                                       FormGroup field,
                                       HelpBlock help) {
        if (!isValid(value)) {
            field.setValidationState(ValidationState.ERROR);
            help.setText(getValidationError());
            return false;
        } else {
            field.setValidationState(ValidationState.NONE);
            help.setText("");
            return true;
        }
    }

}