Skip to content

Commit ec0f8dd

Browse files
committed
Add pattern attribute
1 parent 7e2da5f commit ec0f8dd

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

core/src/main/scala/japgolly/scalajs/react/vdom/HtmlAttrs.scala

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1093,6 +1093,13 @@ trait HtmlAttrs {
10931093
*/
10941094
final def optimum = VdomAttr("optimum")
10951095

1096+
/** The pattern attribute specifies a regular expression against which the control’s value, or, when the multiple
1097+
* attribute applies and is set, the control’s values, are to be checked.
1098+
*
1099+
* @see https://www.w3.org/TR/html5/sec-forms.html#the-pattern-attribute
1100+
*/
1101+
final def pattern = VdomAttr[String]("pattern")
1102+
10961103
/**
10971104
* A hint to the user of what can be entered in the control. The placeholder
10981105
* text must not contain carriage returns or line-feeds. This attribute

doc/changelog/1.4.2.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
* VDOM improvements
1616
* Add helper methods to the `autoComplete` attribute, eg. `^.autoComplete.currentPassword`
1717
* `minLength` and `maxLength` now only accept ints
18+
* add `pattern` attribute
1819

1920
* Dependency upgrades
2021
* Cats 1.6.0

0 commit comments

Comments
 (0)