I’m sorry if this is a duplicate question. Learning through Phoenix docs. I was trying to search for an answer on stack overflow and the web but couldn’t find an exact answer. Then, I looked into implementing some kind of regex but I couldn’t get that to go either. I was wondering if there is a simple way to validate something like a 5 digit zip code or a SSN without dashes in my changeset where it validates a certain amount of numbers. I was also thinking that since the value is already typed as an integer, maybe convert it to a string(?) and use validate_length(?). Not really sure.
Thanks!