Got a quick question, I’m building a big website for a personal project and I think I’m looking at classes and functions for validation of forms and data etc.
My question I guess is:
Can I use a class to house all the functions that will validate dependant upon the data been passed and if so how can I target certain functions within the class (email addresses, phone numbers etc).
If my logic is right how would it look in code format?
Thanks
You could define your validating functions statically within a class. Then include this class as and where you need it.