org.gwtbootstrap3.client.ui.form.validator
Interface HasValidators<T>

Type Parameters:
T - the generic type
All Known Implementing Classes:
BlankValidatorMixin, DefaultValidatorMixin, DoubleBox, Input, IntegerBox, LongBox, SuggestBox, TextArea, TextBox, TextBoxBase, ValueBoxBase

public interface HasValidators<T>

Should use when implementing classes with Validators.

Author:
Steven Jardine

Method Summary
 void addValidator(Validator<T> validator)
          Adds the validator.
 boolean getValidateOnBlur()
          Gets the validate on blur.
 void reset()
          Reset the form element to blank and clear error messages.
 void setValidateOnBlur(boolean validateOnBlur)
          Sets the validate on blur.
 void setValidators(Validator<T>... validators)
          The validators used to validate this object.
 boolean validate()
          Validate the field's value using the supplied validators.
 boolean validate(boolean show)
          Validate the field's value using the supplied validators.
 

Method Detail

addValidator

void addValidator(Validator<T> validator)
Adds the validator.

Parameters:
validator - the validator

getValidateOnBlur

boolean getValidateOnBlur()
Gets the validate on blur.

Returns:
the validate on blur

reset

void reset()
Reset the form element to blank and clear error messages.


setValidateOnBlur

void setValidateOnBlur(boolean validateOnBlur)
Sets the validate on blur.

Parameters:
validateOnBlur - the new validate on blur

setValidators

void setValidators(Validator<T>... validators)
The validators used to validate this object.

Parameters:
validators - the new validators

validate

boolean validate()
Validate the field's value using the supplied validators.

Returns:
true, if valid

validate

boolean validate(boolean show)
Validate the field's value using the supplied validators.

Parameters:
show - the error to the user.
Returns:
true, if valid


Copyright © 2015. All rights reserved.