Skip to content

Commit

Permalink
Test(web-twig): Pass data attribute with and without value
Browse files Browse the repository at this point in the history
  * missing value will be always rendered as boolean(true) -> `"1"` unless the
    value is used
  • Loading branch information
literat committed Jun 11, 2023
1 parent 68ca267 commit cd1927c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
</title>
</head>
<body>
<div data-test="test" class="TextField TextField--error">
<div data-test="test" data-validate="1" data-spirit-validate="1" data-custom-validate="true" class="TextField TextField--error">
<label for="example" class="TextField__label TextField__label--required">Text field</label> <input minlength="6" autocomplete="on" placeholder="Very long text" value="Some long value" type="text" id="example" name="example" class="TextField__input" size="10" required="">
<div class="TextField__message">
validation failed
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,7 @@
placeholder="Very long text"
value="Some long value"
data-test="test"
data-validate={ true }
data-spirit-validate
data-custom-validate="true"
/>

0 comments on commit cd1927c

Please sign in to comment.