graveyard v0.6.5 Graveyard.Validators.Number View Source

Adding a new validator

To add a new validation criteria, you must:

  • Add the new criteria to the @option_keys list
  • Implement one function which returns either :ok or {:error, message}

Link to this section Summary

Link to this section Functions

Link to this function validate(value, options) View Source

Callback implementation for Vex.Validator.Behaviour.validate/2.

Link to this function validate(data, context, options) View Source

Callback implementation for Vex.Validator.Behaviour.validate/3.