Hacker News new | past | comments | ask | show | jobs | submit login

You definitely want an integer to always be an integer, but you often want to represent "A or B". E.g. user has a contact method that's a phone number or an email address. Result of validation is a validated value or a failure message.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: