|
cwist
Modern C web framework with libttak runtime
|
Single validation rule attached to a field. More...
#include <bind.h>
Public Attributes | ||
| cwist_bind_rule_type_t | type | |
| union { | ||
| size_t min_len | ||
| For MIN_LEN. More... | ||
| size_t max_len | ||
| For MAX_LEN. More... | ||
| long double min_val | ||
| For MIN_VAL. More... | ||
| long double max_val | ||
| For MAX_VAL. More... | ||
| const char * pattern | ||
| For REGEX (static string, compiled once). More... | ||
| struct { | ||
| bool(* fn )(const char *value, size_t len, void *ctx) | ||
| void * ctx | ||
| } custom | ||
| For CUSTOM. More... | ||
| } | u | |
| const char * | error_message | |
| Optional override for the default error text. | ||
| struct { ... } cwist_bind_rule::custom |
For CUSTOM.
| cwist_bind_rule_type_t cwist_bind_rule::type |
| union { ... } cwist_bind_rule::u |