ElxValidation.Nullable (elx_validation v0.1.0)

nullable

  • The field under validation may be null.
    data = %{
      optional_name: "majid",
    }
    rules = [
      %{
        field: "optional_name",
        validate: ["nullable" , "alpha" , "min:3"] --> nullable rule as first rule of validation
      },
    ]

Link to this section Summary

Link to this section Functions