/*
- * Copyright (C) 2016, 2017 Roland Häder
+ * 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
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
* @author Roland Häder<roland@mxchange.org>
*/
@FacesValidator ("PhoneNumberValidator")
-public class PizzaPhoneNumberValidator extends BaseLongValidator implements Validator {
+public class PizzaPhoneNumberValidator extends BaseNumberValidator {
/**
* Serial number
@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);