|
|
@@ -8529,8 +8529,8 @@ class FormHelperTest extends TestCase
|
|
|
'type' => 'password',
|
|
|
'value' => '',
|
|
|
'required' => 'required',
|
|
|
- 'onvalid' => 'this.setCustomValidity('')',
|
|
|
- 'oninvalid' => 'this.setCustomValidity('This field is required')',
|
|
|
+ 'oninput' => 'this.setCustomValidity('')',
|
|
|
+ 'oninvalid' => 'this.setCustomValidity(''); if (!this.validity.valid) this.setCustomValidity('This field is required')',
|
|
|
]
|
|
|
];
|
|
|
$this->assertHtml($expected, $result);
|
|
|
@@ -8547,8 +8547,8 @@ class FormHelperTest extends TestCase
|
|
|
'value' => '',
|
|
|
'maxlength' => 255,
|
|
|
'required' => 'required',
|
|
|
- 'onvalid' => 'this.setCustomValidity('')',
|
|
|
- 'oninvalid' => 'this.setCustomValidity('This field cannot be left empty')',
|
|
|
+ 'oninput' => 'this.setCustomValidity('')',
|
|
|
+ 'oninvalid' => 'this.setCustomValidity(''); if (!this.validity.valid) this.setCustomValidity('This field cannot be left empty')',
|
|
|
]
|
|
|
];
|
|
|
$this->assertHtml($expected, $result);
|
|
|
@@ -8565,8 +8565,8 @@ class FormHelperTest extends TestCase
|
|
|
'value' => '',
|
|
|
'maxlength' => 255,
|
|
|
'required' => 'required',
|
|
|
- 'onvalid' => 'this.setCustomValidity('')',
|
|
|
- 'oninvalid' => 'this.setCustomValidity('Custom error message')',
|
|
|
+ 'oninput' => 'this.setCustomValidity('')',
|
|
|
+ 'oninvalid' => 'this.setCustomValidity(''); if (!this.validity.valid) this.setCustomValidity('Custom error message')',
|
|
|
]
|
|
|
];
|
|
|
$this->assertHtml($expected, $result);
|