feat(StatusInput): add force argument to validate to force validation

This commit is contained in:
Jonathan Rainville 2022-07-28 13:26:47 -04:00
parent 2270526071
commit e184348190
1 changed files with 2 additions and 3 deletions

View File

@ -249,9 +249,8 @@ Item {
\qmlmethod \qmlmethod
This function validates the text input's text. This function validates the text input's text.
*/ */
function validate() { function validate(force) {
if (!force && !statusBaseInput.dirty && validationMode === StatusInput.ValidationMode.OnlyWhenDirty) {
if (!statusBaseInput.dirty && validationMode === StatusInput.ValidationMode.OnlyWhenDirty) {
return return
} }
statusBaseInput.valid = true statusBaseInput.valid = true