The Code-Bin
Links
Home
Add your code!
All Listings
About
Latest Entry
Featured Scripts
Author's Website
Latest Entries
FFMPEG Thumbnail Scr...
PHP, 0.8KB
Jul. 29, 10:24pm
John
Z80 Assembler, 190 bytes
Feb. 17, 3:36am
John
Z80 Assembler, 176 bytes
Sep. 13, 2:19am
John
Z80 Assembler, 77 bytes
Sep. 13, 2:18am
John
Z80 Assembler, 209 bytes
Sep. 13, 2:17am
untitled PHP Code
Posted by: Testing | February 22, 2010 @ 12:18am
PHP Code
[
Download
]
<?php /** * Aero PHP Framework * * LICENSE * * This source file is subject to the new BSD license that is bundled * with this package in the file LICENSE.txt. * It is also available through the world-wide-web at this URL: * http://www.aeroframework.com/license/new-bsd * If you did not receive a copy of the license and are unable to * obtain it through the world-wide-web, please send an email * to license@aeroframework.com so we can send you a copy immediately. * * @category Aero * @package Aero\Validator * @subpackage Email * @copyright Copyright (c) 2009-2010 Xistins Technologies (http://www.xistins.com) * @license http://www.aeroframework.com/license/new-bsd New BSD License */ namespace Aero\Validator; /** * Email Validator * * @category Aero * @package Aero\Validator * @subpackage Email * @copyright Copyright (c) 2009-2010 Xistins Technologies (http://www.xistins.com) * @license http://www.aeroframework.com/license/new-bsd New BSD License */ class Email implements Structure { /** * Is valid email * Please note this is extremely simply but should work for most instances * * @param string $value Value to validate * @return bool */ public function isValid($value) { if(!strpos($value, '@')) { return false; } $parts = explode('@', $value); if(!strpos($parts[1], '.')) { return false; } return (filter_var($value, FILTER_VALIDATE_EMAIL) === $value); } }
Syntax Highlighting
[
Open in new window
]
Author Comments
none
Rating
4.49 / 8
53 Votes
http://codebin.yi.org/512
page generated in 0.00 seconds