Validation function checkpoint #3

Now adds data and classes related to the cause of the failure, e.g. if
the input failed pattern validation, then it and its response container
will have the `validify-failed-pattern` class.