]> git.mxchange.org Git - addressbook-war.git/commitdiff
Please cherry-pick:
authorRoland Häder <roland@mxchange.org>
Sun, 25 Sep 2022 20:36:04 +0000 (22:36 +0200)
committerRoland Häder <roland@mxchange.org>
Sun, 25 Sep 2022 20:37:46 +0000 (22:37 +0200)
- 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 <roland@mxchange.org>
src/java/org/mxchange/addressbook/validator/business/basicdata/AddressbookCompanyNameValidator.java

index f0ef3eb0a67af4a1e3fea272f8d0e68b57cad378..5bf52473cbe6eeb7a0404b12a9160bbe39815d23 100644 (file)
@@ -66,7 +66,7 @@ public class AddressbookCompanyNameValidator 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 AddressbookCompanyNameValidator 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