z_validation (zotonic_core v1.0.0-rc.17)
Handle parameter validation of a request. Checks for the presence of z_v elements containing validation information.
Summary
Functions
Simple utility function to get the 'q' value of an argument. When the argument has a generated unique prefix then the prefix is stripped.
Rename validator arguments to names that are compatible with the LiveValidation plugin.
Add all errors as javascript message to the request result.
Checks for z_v arguments, performs enclosed checks and adds the validated terms to the q_validated list. Errors are reported back to the user agent
Functions
Simple utility function to get the 'q' value of an argument. When the argument has a generated unique prefix then the prefix is stripped.
-spec rename_args(proplists:proplist()) -> proplists:proplist().
Rename validator arguments to names that are compatible with the LiveValidation plugin.
Add all errors as javascript message to the request result.
Checks for z_v arguments, performs enclosed checks and adds the validated terms to the q_validated list. Errors are reported back to the user agent