Fulib v0.1.18 Fulib.Validate View Source
Link to this section Summary
Functions
根据rule_keys里的对应关系,找到params key对应的rule key
Link to this section Functions
Link to this function
skip?(value, options) View Source
Link to this function
unless_skipping(value, options, list) View Source
Link to this function
validate_changeset(changeset, rules \\ %{}, rule_keys \\ %{}) View Source
根据rule_keys里的对应关系,找到params key对应的rule key
Link to this function
validate_value(value, value_type, rules \\ %{}) View Source
校验数据值
Params
value
value_type
数据类型: :integer, :string, :boolean, :float, :utc_datetime, and {:array, :xxx}
rules
:presence:blank:min_length:max_length:min_value:max_value:numericality:format_with:format_message:format_email:format_url:format_integer:format_pure_number:inclusion:exclusion:acceptance:trim:chars