Ecto will cast from strings since when using HTML forms strings is all you get from browsers. Casting to string, on the other hand, is rarely required. If it’s something you need, the best way would probably be with a custom type.
Ecto will cast from strings since when using HTML forms strings is all you get from browsers. Casting to string, on the other hand, is rarely required. If it’s something you need, the best way would probably be with a custom type.