Search in sources :

Example 1 with KeyValueFormatValidation

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

the class SetupNetworksBondModel method validate.

public boolean validate() {
    getBond().validateSelectedItem(new IValidation[] { new NotEmptyValidation(), new LengthValidation(BusinessEntitiesDefinitions.HOST_NIC_NAME_LENGTH), new BondNameValidation() });
    getCustomBondEditor().setIsValid(true);
    if (getBondingOptions().getSelectedItem().getKey().equals(CUSTOM_BONDING_MODE)) {
        getCustomBondEditor().validateEntity(new IValidation[] { new KeyValueFormatValidation() });
    }
    return getBond().getIsValid() && getCustomBondEditor().getIsValid();
}
Also used : BondNameValidation(org.ovirt.engine.ui.uicommonweb.validation.BondNameValidation) NotEmptyValidation(org.ovirt.engine.ui.uicommonweb.validation.NotEmptyValidation) LengthValidation(org.ovirt.engine.ui.uicommonweb.validation.LengthValidation) KeyValueFormatValidation(org.ovirt.engine.ui.uicommonweb.validation.KeyValueFormatValidation)

Aggregations

BondNameValidation (org.ovirt.engine.ui.uicommonweb.validation.BondNameValidation)1 KeyValueFormatValidation (org.ovirt.engine.ui.uicommonweb.validation.KeyValueFormatValidation)1 LengthValidation (org.ovirt.engine.ui.uicommonweb.validation.LengthValidation)1 NotEmptyValidation (org.ovirt.engine.ui.uicommonweb.validation.NotEmptyValidation)1