Added simple default validation function and namespace for an onError function.