z_validation (zotonic_core v1.0.0-rc.10)

Handle parameter validation of a request. Checks for the presence of z_v elements containing validation information.

Link to this section 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

Link to this section Functions

Link to this function

get_q(Name, Context)

Simple utility function to get the 'q' value of an argument. When the argument has a generated unique prefix then the prefix is stripped.
Link to this function

rename_args(Args)

Rename validator arguments to names that are compatible with the LiveValidation plugin.
Link to this function

report_errors(T, Context)

Add all errors as javascript message to the request result.
Link to this function

validate_query_args(Context)

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