From: Roland Häder Date: Sun, 25 Sep 2022 20:36:04 +0000 (+0200) Subject: Please cherry-pick: X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=60228453f0f6f6278207f27a2fc09cdbfcd9c4c0;p=pizzaservice-war.git Please cherry-pick: - branch offices have optional email addresses (finally found the bug that you always must enter an email address while the form field is not marked as required) Signed-off-by: Roland Häder --- diff --git a/src/java/org/mxchange/pizzaapplication/validator/business/basicdata/PizzaCompanyNameValidator.java b/src/java/org/mxchange/pizzaapplication/validator/business/basicdata/PizzaCompanyNameValidator.java index 33bef796..d45804e0 100644 --- a/src/java/org/mxchange/pizzaapplication/validator/business/basicdata/PizzaCompanyNameValidator.java +++ b/src/java/org/mxchange/pizzaapplication/validator/business/basicdata/PizzaCompanyNameValidator.java @@ -66,7 +66,7 @@ public class PizzaCompanyNameValidator extends BaseStringValidator { final String[] requiredFields = {"companyName"}; //NOI18N // Pre-validation (example: not null, not a string, empty string ...) - super.preValidate(context, component, value, requiredFields, false); + super.preValidate(context, component, value, requiredFields, Boolean.FALSE); // Convert name to string (now securely checked in BaseStringValidator) final String companyName = (String) value; @@ -74,7 +74,7 @@ public class PizzaCompanyNameValidator extends BaseStringValidator { // Default is to check on existing names Boolean checkExisting = Boolean.TRUE; - // Is attribute "allowEmptyValue" set? + // Is attribute "checkExisting" set? if (component.getAttributes().containsKey("checkExisting")) { //NOI18N // Get attribute final Object attribute = component.getAttributes().get("checkExisting"); //NOI18N