New answers tagged

2 votes
Accepted

JS function to check if a date is in the correct format

An invalid date will be recognized by the Date object, as you can see here. ...
user avatar
4 votes

OOP PHP form builder with validation

OOP I agree with the answer by Kiko. You didn't ask about MVC code but if that is a goal then it would be wise to only have HTML/text output by the view components - e.g. either in FormGenerator.php ...
user avatar
4 votes
Accepted

OOP PHP form builder with validation

This looks like proper OOP code. It doesn't just encapsulate a lot of functions in a single class. It's expandable with more input types and errors, but I am afraid that you might have overdone it a ...
user avatar

Top 50 recent answers are included