Added simple default validation function and namespace for an onError function.
Merge from lewisnyman-allow-validation