Search in sources :

Example 6 with AsciiOrNoneValidation

use of org.ovirt.engine.ui.uicommonweb.validation.AsciiOrNoneValidation in project ovirt-engine by oVirt.

the class DataCenterModel method validate.

public boolean validate() {
    getName().validateEntity(new IValidation[] { new NotEmptyValidation(), new LengthValidation(40), new LengthValidation(getMaxNameLength()), new AsciiNameValidation() });
    getVersion().validateSelectedItem(new IValidation[] { new NotEmptyValidation() });
    getDescription().validateEntity(new IValidation[] { new AsciiOrNoneValidation() });
    getComment().validateEntity(new IValidation[] { new SpecialAsciiI18NOrNoneValidation() });
    boolean validationResult = getName().getIsValid() && getDescription().getIsValid() && getComment().getIsValid() && getVersion().getIsValid();
    return validationResult;
}
Also used : AsciiOrNoneValidation(org.ovirt.engine.ui.uicommonweb.validation.AsciiOrNoneValidation) NotEmptyValidation(org.ovirt.engine.ui.uicommonweb.validation.NotEmptyValidation) AsciiNameValidation(org.ovirt.engine.ui.uicommonweb.validation.AsciiNameValidation) SpecialAsciiI18NOrNoneValidation(org.ovirt.engine.ui.uicommonweb.validation.SpecialAsciiI18NOrNoneValidation) LengthValidation(org.ovirt.engine.ui.uicommonweb.validation.LengthValidation)

Aggregations

AsciiOrNoneValidation (org.ovirt.engine.ui.uicommonweb.validation.AsciiOrNoneValidation)6 NotEmptyValidation (org.ovirt.engine.ui.uicommonweb.validation.NotEmptyValidation)6 AsciiNameValidation (org.ovirt.engine.ui.uicommonweb.validation.AsciiNameValidation)3 LengthValidation (org.ovirt.engine.ui.uicommonweb.validation.LengthValidation)3 SpecialAsciiI18NOrNoneValidation (org.ovirt.engine.ui.uicommonweb.validation.SpecialAsciiI18NOrNoneValidation)2 I18NNameValidation (org.ovirt.engine.ui.uicommonweb.validation.I18NNameValidation)1