]> git.mxchange.org Git - addressbook-war.git/blobdiff - src/java/org/mxchange/addressbook/validator/names/AddressbookNameValidator.java
Updated copyright year
[addressbook-war.git] / src / java / org / mxchange / addressbook / validator / names / AddressbookNameValidator.java
index ea6b426f725ac98fc2e5454bf083e1df18b27ac7..818e6c56d694d26ff4a793f5c41f948de8097f27 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2016 Roland Haeder
+ * Copyright (C) 2016 - 2024 Free Software Foundation
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -19,17 +19,16 @@ package org.mxchange.addressbook.validator.names;
 import javax.faces.component.UIComponent;
 import javax.faces.context.FacesContext;
 import javax.faces.validator.FacesValidator;
-import javax.faces.validator.Validator;
 import javax.faces.validator.ValidatorException;
 import org.mxchange.jcoreee.validator.string.BaseStringValidator;
 
 /**
  * A validation class for addressbook names, such as first name or family name.
  * <p>
- * @author Roland Haeder<roland@mxchange.org>
+ * @author Roland Hรคder<roland@mxchange.org>
  */
-@FacesValidator (value = "AddressbookNameValidator")
-public class AddressbookNameValidator extends BaseStringValidator implements Validator {
+@FacesValidator ("NameValidator")
+public class AddressbookNameValidator extends BaseStringValidator {
 
        /**
         * Serial number
@@ -38,16 +37,11 @@ public class AddressbookNameValidator extends BaseStringValidator implements Val
 
        @Override
        public void validate (final FacesContext context, final UIComponent component, final Object value) throws ValidatorException {
-               // Trace message
-               //* NOISY-DEBUG: */ System.out.println(MessageFormat.format("validate: context={0},component={1},value={2} - CALLED!", context, component, value)); //NOI18N
-
                // All accepted, required fields
-               String[] requiredFields = {"addressbookName"}; //NOI18N
+               final String[] requiredFields = {"firstName", "familyName", "city", "street", "addressbookName"}; //NOI18N
 
                // Pre-validation (example: not null, not a string, empty string ...)
                super.preValidate(context, component, value, requiredFields, false);
-
-               // Trace message
-               //* NOISY-DEBUG: */ System.out.println("validate: EXIT!"); //NOI18N
        }
+
 }