Search in sources :

Example 1 with NoSpecialCharactersWithDotValidation

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

the class VmInterfaceModel method validate.

public boolean validate() {
    getName().validateEntity(new IValidation[] { new NotEmptyValidation(), new NoSpecialCharactersWithDotValidation() });
    getNicType().validateSelectedItem(new IValidation[] { new NotEmptyValidation() });
    getProfile().validateSelectedItem(new IValidation[] { new VnicProfileValidation(getNicType().getSelectedItem()) });
    getMAC().setIsValid(true);
    if (getMAC().getIsChangable()) {
        getMAC().validateEntity(new IValidation[] { new NotEmptyValidation(), new UnicastMacAddressValidation() });
    }
    validateNetworkFilterParameters();
    return getName().getIsValid() && getNicType().getIsValid() && getMAC().getIsValid() && getProfile().getIsValid() && getNetworkFilterParameterListModel().getIsValid();
}
Also used : NoSpecialCharactersWithDotValidation(org.ovirt.engine.ui.uicommonweb.validation.NoSpecialCharactersWithDotValidation) VnicProfileValidation(org.ovirt.engine.ui.uicommonweb.validation.VnicProfileValidation) NotEmptyValidation(org.ovirt.engine.ui.uicommonweb.validation.NotEmptyValidation) UnicastMacAddressValidation(org.ovirt.engine.ui.uicommonweb.validation.UnicastMacAddressValidation)

Aggregations

NoSpecialCharactersWithDotValidation (org.ovirt.engine.ui.uicommonweb.validation.NoSpecialCharactersWithDotValidation)1 NotEmptyValidation (org.ovirt.engine.ui.uicommonweb.validation.NotEmptyValidation)1 UnicastMacAddressValidation (org.ovirt.engine.ui.uicommonweb.validation.UnicastMacAddressValidation)1 VnicProfileValidation (org.ovirt.engine.ui.uicommonweb.validation.VnicProfileValidation)1