]> git.mxchange.org Git - jfinancials-war.git/blobdiff - src/java/org/mxchange/jfinancials/validator/phone/number/FinancialsPhoneNumberValidator.java
Updated copyright year
[jfinancials-war.git] / src / java / org / mxchange / jfinancials / validator / phone / number / FinancialsPhoneNumberValidator.java
index 274dcb2ecd99b73105187115e56ea9153b2c0729..c5e6ccff96d04488369f65b187537b1dc582367d 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2016 Roland Häder
+ * Copyright (C) 2016 - 2022 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.jfinancials.validator.phone.number;
 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.number.BaseLongValidator;
+import org.mxchange.jcoreee.validator.number.BaseNumberValidator;
 
 /**
  * A validator for phone, fax and mobile numbers
  * <p>
  * @author Roland Häder<roland@mxchange.org>
  */
-@FacesValidator (value = "PhoneNumberValidator")
-public class FinancialsPhoneNumberValidator extends BaseLongValidator implements Validator {
+@FacesValidator ("PhoneNumberValidator")
+public class FinancialsPhoneNumberValidator extends BaseNumberValidator {
 
        /**
         * Serial number
@@ -39,7 +38,7 @@ public class FinancialsPhoneNumberValidator extends BaseLongValidator implements
        @Override
        public void validate (final FacesContext context, final UIComponent component, final Object value) throws ValidatorException {
                // The required field
-               String[] requiredFields = {"landLineAreaCode", "landLineNumber", "faxAreaCode", "faxNumber", "mobileNumber"}; //NOI18N
+               final String[] requiredFields = {"landLineAreaCode", "landLineNumber", "faxAreaCode", "faxNumber", "mobileNumber"}; //NOI18N
 
                // Pre-validation (example: not null, not a string, empty string ...)
                super.preValidate(context, component, value, requiredFields, true);