Validate v0.2.4 Validate
Validate, validate incoming requests in an easy to reason-about way.
Link to this section Summary
Functions
Validate.validate/2, the entry point for validation.
Takes in a struct. Returns either:
{:ok, data}
or {:error, errors}
Data returned is filtered out to only keys provided in rules
Link to this section Functions
Link to this function
validate(params, rules)
Validate.validate/2, the entry point for validation.
Takes in a struct. Returns either:
{:ok, data}
or {:error, errors}
Data returned is filtered out to only keys provided in rules