Created
September 1, 2011 22:04
-
-
Save fullo/1187415 to your computer and use it in GitHub Desktop.
a small symfony 1.x validator for google analytics code
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class sfValidatorUACode extends sfValidatorRegex | |
{ | |
protected function configure($options = array(), $messages = array()) { | |
parent::configure($options, $messages); | |
$this->setOption('pattern', '/^ua-\d{4,9}-\d{1,4}$/i'); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment