Glese Posted December 2, 2011 Share Posted December 2, 2011 Where in the PHP manual can I find information about input validation? I looked and I seem to not find it. I am intending to create my own email input validation. Link to comment https://forums.phpfreaks.com/topic/252281-input-validation-in-the-php-manual/ Share on other sites More sharing options...
awjudd Posted December 2, 2011 Share Posted December 2, 2011 Have you looked at the filter[/code] functions? ~awjudd Link to comment https://forums.phpfreaks.com/topic/252281-input-validation-in-the-php-manual/#findComment-1293369 Share on other sites More sharing options...
Glese Posted December 2, 2011 Author Share Posted December 2, 2011 Validating an email is that easy nowadays? Did I understand right, all I have to do is: filter_var($email, FILTER_VALIDATE_EMAIL); Is this accurate, the way how I have understood it? How can I tell, what FILTER_VALIDATE_EMAIL finally is doing or how exactly it is filtering, does documentation state this somewhere? Link to comment https://forums.phpfreaks.com/topic/252281-input-validation-in-the-php-manual/#findComment-1293374 Share on other sites More sharing options...
salathe Posted December 2, 2011 Share Posted December 2, 2011 How can I tell, what FILTER_VALIDATE_EMAIL finally is doing or how exactly it is filtering, does documentation state this somewhere? The internal workings generally aren't documented, and what exactly this email validation accepts as valid would take a lot of describing (though it would be nice to have this). This email validation simply uses a regular expression. The exact regular expression used has changed over time since FILTER_VALIDATE_EMAIL was introduced, but you can see it in the PHP source code. Here it is for the upcoming PHP 5.4, http://svn.php.net/viewvc/php/php-src/branches/PHP_5_4/ext/filter/logical_filters.c?view=markup#l499 Link to comment https://forums.phpfreaks.com/topic/252281-input-validation-in-the-php-manual/#findComment-1293377 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.