aboutsummaryrefslogtreecommitdiffstats
path: root/src/ng
diff options
context:
space:
mode:
authorJonathan Card2012-12-16 14:32:19 -0700
committerPawel Kozlowski2013-01-04 09:28:35 +0100
commit36089931a578e6ffe204a1ed17f1773cb9a90dd0 (patch)
tree223605bebe4a3f2dae3b527554481f70ab6252a8 /src/ng
parent74db36ee94addab519a7198bd987b44228309d59 (diff)
downloadangular.js-36089931a578e6ffe204a1ed17f1773cb9a90dd0.tar.bz2
docs(form): minor form doc and example fixes
Form documentation fixes: - Fix broken form example in docs - A few small other corrections in form docs.
Diffstat (limited to 'src/ng')
-rw-r--r--src/ng/directive/form.js10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/ng/directive/form.js b/src/ng/directive/form.js
index b4d500c6..36b775cb 100644
--- a/src/ng/directive/form.js
+++ b/src/ng/directive/form.js
@@ -15,13 +15,13 @@ var nullFormCtrl = {
*
* @property {boolean} $pristine True if user has not interacted with the form yet.
* @property {boolean} $dirty True if user has already interacted with the form.
- * @property {boolean} $valid True if all of the containg forms and controls are valid.
+ * @property {boolean} $valid True if all of the containing forms and controls are valid.
* @property {boolean} $invalid True if at least one containing control or form is invalid.
*
* @property {Object} $error Is an object hash, containing references to all invalid controls or
* forms, where:
*
- * - keys are validation tokens (error names) — such as `REQUIRED`, `URL` or `EMAIL`),
+ * - keys are validation tokens (error names) — such as `required`, `url` or `email`),
* - values are arrays of controls or forms that are invalid with given error.
*
* @description
@@ -162,7 +162,7 @@ function FormController(element, attrs) {
* does not allow nesting of form elements. It is useful to nest forms, for example if the validity of a
* sub-group of controls needs to be determined.
*
- * @param {string=} ngForm|name Name of the form. If specified, the form controller will be published into
+ * @param {string=} name|ngForm Name of the form. If specified, the form controller will be published into
* related scope, under this name.
*
*/
@@ -235,12 +235,12 @@ function FormController(element, attrs) {
</script>
<form name="myForm" ng-controller="Ctrl">
userType: <input name="input" ng-model="userType" required>
- <span class="error" ng-show="myForm.input.$error.REQUIRED">Required!</span><br>
+ <span class="error" ng-show="myForm.input.$error.required">Required!</span><br>
<tt>userType = {{userType}}</tt><br>
<tt>myForm.input.$valid = {{myForm.input.$valid}}</tt><br>
<tt>myForm.input.$error = {{myForm.input.$error}}</tt><br>
<tt>myForm.$valid = {{myForm.$valid}}</tt><br>
- <tt>myForm.$error.REQUIRED = {{!!myForm.$error.REQUIRED}}</tt><br>
+ <tt>myForm.$error.required = {{!!myForm.$error.required}}</tt><br>
</form>
</doc:source>
<doc:scenario>