From b842642b574a2b95c53b791308ed1bf8ff9d304d Mon Sep 17 00:00:00 2001 From: Igor Minar Date: Wed, 15 Jun 2011 22:31:40 -0700 Subject: docs - stripping extra new lines --- ...uide.templates.validators.creating_validators.ngdoc | 18 ------------------ 1 file changed, 18 deletions(-) (limited to 'docs/content/guide/dev_guide.templates.validators.creating_validators.ngdoc') diff --git a/docs/content/guide/dev_guide.templates.validators.creating_validators.ngdoc b/docs/content/guide/dev_guide.templates.validators.creating_validators.ngdoc index 661ce744..835b0b51 100644 --- a/docs/content/guide/dev_guide.templates.validators.creating_validators.ngdoc +++ b/docs/content/guide/dev_guide.templates.validators.creating_validators.ngdoc @@ -4,17 +4,13 @@ @description - - To create a custom validator, you simply add your validator code as a method onto the `angular.validator` object and provide input(s) for the validator function. Each input provided is treated as an argument to the validator function. Any additional inputs should be separated by commas. - The following bit of pseudo-code shows how to set up a custom validator: -
 angular.validator('your_validator', function(input [,additional params]) {
         [your validation code];
@@ -26,22 +22,17 @@ angular.validator('your_validator', function(input [,additional params]) {
 }
 
- Note that this validator returns "true" when the user's input is incorrect, as in "Yes, it's true, there was a problem with that input". If you prefer to provide more information when a validator detects a problem with input, you can specify an error message in the validator that angular will display when the user hovers over the input widget. - To specify an error message, replace "`return true;`" with an error string, for example: - return "Must be a value between 1 and 5!"; - Following is a sample UPS Tracking Number validator: -