use of org.ovirt.engine.ui.uicommonweb.validation.LengthValidation 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();
}
use of org.ovirt.engine.ui.uicommonweb.validation.LengthValidation in project ovirt-engine by oVirt.
the class RoleModel method validate.
public boolean validate() {
RegexValidation tempVar = new RegexValidation();
// $NON-NLS-1$
tempVar.setExpression("^\\w.{0,125}$");
tempVar.setMessage(ConstantsManager.getInstance().getConstants().nameMustBeUpToAndStartWithMsg());
RegexValidation tempVar2 = new RegexValidation();
// $NON-NLS-1$
tempVar2.setExpression("^[A-Za-z0-9_-]+$");
tempVar2.setMessage(ConstantsManager.getInstance().getConstants().asciiNameValidationMsg());
getName().validateEntity(new IValidation[] { new NotEmptyValidation(), tempVar, tempVar2 });
LengthValidation lengthValidation = new LengthValidation();
lengthValidation.setMaxLength(4000);
getDescription().validateEntity(new IValidation[] { lengthValidation });
return getName().getIsValid() && getDescription().getIsValid();
}
use of org.ovirt.engine.ui.uicommonweb.validation.LengthValidation in project ovirt-engine by oVirt.
the class NewClusterPolicyModel method validate.
private boolean validate() {
getName().validateEntity(new IValidation[] { new NotEmptyValidation(), new LengthValidation(50), new AsciiNameValidation() });
getDescription().validateEntity(new IValidation[] { new LengthValidation(400), new AsciiOrNoneValidation() });
return getName().getIsValid() && getDescription().getIsValid() && getCustomPropertySheet().validate();
}
use of org.ovirt.engine.ui.uicommonweb.validation.LengthValidation in project ovirt-engine by oVirt.
the class AffinityGroupModel method validate.
protected boolean validate() {
getName().validateEntity(new IValidation[] { new NotEmptyValidation(), new LengthValidation(255), new I18NNameValidation() });
getDescription().validateEntity(new IValidation[] { new AsciiOrNoneValidation() });
return getName().getIsValid() && getDescription().getIsValid();
}
use of org.ovirt.engine.ui.uicommonweb.validation.LengthValidation in project ovirt-engine by oVirt.
the class XENPropertiesModel method validate.
public boolean validate() {
if (!getIsAvailable()) {
setIsValid(true);
} else {
getUrl().validateEntity(new IValidation[] { new NotEmptyValidation(), new LengthValidation(255) });
setIsValid(getUrl().getIsValid());
}
return getIsValid();
}
Aggregations