Answer the question
In order to leave comments, you need to log in
How to correctly connect a library from composer to your global class?
Greetings!
There is a global class for validating various objects, which has a validEmail() method. We have included
a library with awesome validation of email addresses in composer, but I want to somehow standardize and throw new features into an existing method. How to do it right?
pull not
$validator = new EmailValidator();
$multipleValidations = new MultipleValidationWithAnd([
new RFCValidation(),
new DNSCheckValidation()
]);
$validator->isValid("[email protected]", $multipleValidations); //true
$validator = new Validation();
$validation->isValidEmail("[email protected]");
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question