You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I wanted to check if this is intended or not. I'm happy to try and put together a pull request if you'd like this implemented.
At the moment validate_required returns true so long as the field exists in the changeset. This differs from Elixir Ecto's implementation which from their docs says:
If the value of a field is nil or a string made only of whitespace, the changeset is marked as invalid, the field is removed from the changeset's changes, and an error is added. An error won't be added if the field already has an error.
Should Crecto follow the same process - as well as including an additional parameter for an option to trim whitespace? e.g.
validate_required :name, {trim:true}
The text was updated successfully, but these errors were encountered:
I wanted to check if this is intended or not. I'm happy to try and put together a pull request if you'd like this implemented.
At the moment
validate_required
returns true so long as the field exists in the changeset. This differs from Elixir Ecto's implementation which from their docs says:Should Crecto follow the same process - as well as including an additional parameter for an option to trim whitespace? e.g.
The text was updated successfully, but these errors were encountered: