exvalidate v0.0.1 API Reference

Modules

Enter point for validate data structure.

Plug for validate request into the router file. For validate the request we need create a schema keywordlist with the rules assigned to params.

Define the error functions for the plug. We can choose return errors in the next formats

The field under validation must be "yes", "on", 1, or true.

The field under validation must have a size between the given min and max.

Validate default rule, this rule validate if exists value. If exists value return this value, if not exists return default value.

Validate email rule, return ok if email is valid, an error if is invalid.

This module validate that the value or list of values are into the list. Types allowed

This rules Specifies the exact length of value, the allowed types are

This module validate the max length of list and strings. Value types

This module validate the length of list and strings. Value types

Required rule check the data content, if the content is nil or empty string the rule required return error.

This validation check the type of variable. The checked types are the next: