diff --git a/mkdocs/acelements.md b/mkdocs/acelements.md index 5de3f0b..c878068 100644 --- a/mkdocs/acelements.md +++ b/mkdocs/acelements.md @@ -161,7 +161,7 @@ AutoConnectInput generates an HTML `#!html ` tag and a `#!htm ### Constructor ```cpp -AutoConnectInput(const char* name, const char* value, const char* label, const char* placeholder) +AutoConnectInput(const char* name, const char* value, const char* label, const char* pattern, const char* placeholder) ``` ### name @@ -176,6 +176,21 @@ It becomes a string value of the `value` attribute of an HTML `#!html ` tag with an id attribute. The input box and the label are connected by the id attribute. +### pattern + +A `pattern` specifies a [regular expression](https://www.w3schools.com/js/js_regexp.asp) that the AutoConnectInput element's value is checked against on form submission. If it is invalid, the background color will change, but it will be sent even if the data format does not match. + +- The password that must contain 8 or more characters that are of at least one number, and one uppercase and lowercase letter:
`(?=.*\d)(?=.*[a-z])(?=.*[A-Z]).{8,}` +- Email address as _characters@characters.domain_:
`[a-z0-9._%+-]+@[a-z0-9.-]+\.[a-z]{2,}$` + +- IP address + +- Host name of the internet + +- Date (MM-DD-YYYY) + +- Twitter account:
`^@?(\w){1,15}$` + ### placeholder A placeholder is an option string. Specification of a placeholder will generate a `placeholder` attribute for the input tag. diff --git a/mkdocs/apielements.md b/mkdocs/apielements.md index 137c5e0..4ec611d 100644 --- a/mkdocs/apielements.md +++ b/mkdocs/apielements.md @@ -164,13 +164,14 @@ Returns type of AutoConnectElement. ### Constructor ```cpp -AutoConnectInput(const char* name = "", const char* value = "", const char* label = "", const char* placeholder = "") +AutoConnectInput(const char* name = "", const char* value = "", const char* label = "", const char* pattern = "", const char* placeholder = "") ```
**Parameters**
nameThe element name.
valueValue of the element.
labelLabel string.
+
patternRegular expression string for checking data format.
placeholderA placeholder string.
@@ -200,6 +201,14 @@ A label is an optional string. A label is always arranged on the left side of th
String
+#### pattern + +A pattern specifies a regular expression that the input-box's value is checked against on form submission. +
+
**Type**
+
String
+
+ #### placeholder A placeholder is an option string. Specification of a placeholder will generate a `placeholder` attribute for the input tag.