Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I always search out that a validation library hasn't already been done in my current language first before attempting validation with custom code - this leads to more easily maintainable code for future eyes.

For example in PHP I use filter_var function with the FILTER_VALIDATE_EMAIL [1] - while it's great to know why and how to do a particular thing programming, it's better to use a time tested library that is maintained by multiple eyes versus just your own.

[1] http://php.net/manual/en/filter.examples.validation.php



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

Search: