Add argument to pass all elements.

Adds an argument to the validate method to pass all field data.
Fix php validation plugin to use placeholders
Address Hugh's review comments