Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/Forms/EmailInput.php
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,8 @@ public function __toString(): string
'id ' . $this->name,
'name ' . $this->name,
'value ' . $this->value,
'autocorrect off',
'autocapitalize off',
...$this->inputProperties
);

Expand Down
6 changes: 3 additions & 3 deletions tests/Forms/EmailInputTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class EmailInputTest extends TestCase
public function can_set_value(): void // phpcs:ignore
{
$expected = <<<html
<label for="email">Email</label><input id="email" name="email" type="email" value="support@8fold.pro">
<label for="email">Email</label><input id="email" name="email" type="email" value="support@8fold.pro" autocapitalize="off" autocorrect="off">
html;

$result = (string) EmailInput::create(
Expand All @@ -30,7 +30,7 @@ public function can_set_value(): void // phpcs:ignore
public function can_set_warning_message(): void // phpcs:ignore
{
$expected = <<<html
<label for="email">Email</label><input id="email" name="email" type="email" aria-describedby="email-warning" aria-invalid="true"><p id="email-warning">Invalid value</p>
<label for="email">Email</label><input id="email" name="email" type="email" aria-describedby="email-warning" aria-invalid="true" autocapitalize="off" autocorrect="off"><p id="email-warning">Invalid value</p>
html;

$result = (string) EmailInput::create(
Expand All @@ -46,7 +46,7 @@ public function can_set_warning_message(): void // phpcs:ignore
public function is_expected_base(): void // phpcs:ignore
{
$expected = <<<html
<label for="email">Email</label><input id="email" name="email" type="email">
<label for="email">Email</label><input id="email" name="email" type="email" autocapitalize="off" autocorrect="off">
html;

$result = (string) EmailInput::create(
Expand Down
Loading