Module z_validation

Handle parameter validation of a request.

Copyright 2009-2010 Marc Worrell

Authors: Marc Worrell (marc@worrell.nl).

Description

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

Function Index

get_q/2Simple utility function to get the 'q' value of an argument.
rename_args/1Rename validator arguments to names that are compatible with the LiveValidation plugin.
report_errors/2Add all errors as javascript message to the request result.
validate_query_args/1Checks for z_v arguments, performs enclosed checks and adds the validated terms to the q_validated list.

Function Details

get_q/2

get_q(Name, Context) -> any()

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_args/1

rename_args(Args::PropList) -> PropList1

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

report_errors/2

report_errors(T, Context) -> any()

Add all errors as javascript message to the request result.

validate_query_args/1

validate_query_args(Context) -> {ok, NewContext} | {error, NewContext}

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


Generated by EDoc, Oct 19 2014, 15:21:40.