SigmaKit.Util.Changeset (sigma_kit v0.0.16)
Summary
Functions
Trim whitespace on either end of a string. Account for nil
Validate URLs. Adds https if a scheme doesn't exist. eg. "google.com" -> "https://google.com"
Functions
Trim whitespace on either end of a string. Account for nil
Validate URLs. Adds https if a scheme doesn't exist. eg. "google.com" -> "https://google.com"
Examples:
defp changeset(user) do
user
|> cast([:website])
|> validate_and_fix_url(:website)
end