All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.vfdtech.validators.PhoneValidator Maven / Gradle / Ivy

Go to download

A utilities service with generic tools implementation. Can be plugged into your java project

There is a newer version: 0.3.5
Show newest version
package org.vfdtech.validators;

import jakarta.validation.ConstraintValidator;
import jakarta.validation.ConstraintValidatorContext;
import org.vfdtech.annotations.ValidPhone;
import org.vfdtech.implementations.PhoneNumberUtils;
import org.vfdtech.interfaces.IPhoneNumberUtils;

public class PhoneValidator implements ConstraintValidator {

    private final IPhoneNumberUtils iPhoneNumberUtils;
    PhoneValidator(){
      iPhoneNumberUtils = new PhoneNumberUtils();
    }
    @Override
    public boolean isValid(String s, ConstraintValidatorContext constraintValidatorContext) {
        return iPhoneNumberUtils.isValid(s);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy