From 4f78fd692c0ec51241476e6be9a4df06cd62fdd6 Mon Sep 17 00:00:00 2001
From: Misko Hevery
Date: Thu, 8 Sep 2011 13:56:29 -0700
Subject: feat(forms): new and improved forms
---
docs/content/api/angular.inputType.ngdoc | 92 ++++++++++++++++++++++++++++++++
docs/content/api/angular.service.ngdoc | 2 -
docs/content/api/index.ngdoc | 2 -
3 files changed, 92 insertions(+), 4 deletions(-)
create mode 100644 docs/content/api/angular.inputType.ngdoc
(limited to 'docs/content/api')
diff --git a/docs/content/api/angular.inputType.ngdoc b/docs/content/api/angular.inputType.ngdoc
new file mode 100644
index 00000000..434fe6c2
--- /dev/null
+++ b/docs/content/api/angular.inputType.ngdoc
@@ -0,0 +1,92 @@
+@ngdoc overview
+@name angular.inputType
+@description
+
+Angular {@link guide/dev_guide.forms forms} allow you to build complex widgets. However for
+simple widget which are based on HTML input text element a simpler way of providing the validation
+and parsing is also provided. `angular.inputType` is a short hand for creating a widget which
+already has the DOM listeners and `$render` method supplied. The only thing which needs to
+be provided by the developer are the optional `$validate` listener and
+`$parseModel` or `$parseModel` methods.
+
+All `inputType` widgets support:
+
+ - CSS classes:
+ - **`ng-valid`**: when widget is valid.
+ - **`ng-invalid`**: when widget is invalid.
+ - **`ng-pristine`**: when widget has not been modified by user action.
+ - **`ng-dirty`**: when has been modified do to user action.
+
+ - Widget properties:
+ - **`$valid`**: When widget is valid.
+ - **`$invalid`**: When widget is invalid.
+ - **`$pristine`**: When widget has not been modified by user interaction.
+ - **`$dirty`**: When user has been modified do to user interaction.
+ - **`$required`**: When the `` element has `required` attribute. This means that the
+ widget will have `REQUIRED` validation error if empty.
+ - **`$disabled`**: When the `` element has `disabled` attribute.
+ - **`$readonly`**: When the `` element has `readonly` attribute.
+
+ - Widget Attribute Validators:
+ - **`required`**: Sets `REQUIRED` validation error key if the input is empty
+ - **`ng:pattern`** Sets `PATTERN` validation error key if the value does not match the
+ RegExp pattern expression. Expected value is `/regexp/` for inline patterns or `regexp` for
+ patterns defined as scope expressions.
+
+
+
+# Example
+
+
+
+
+