Hidden fields are supposed to be ignored during validation; more
completely ensure this by checking in HTMLForm::trySubmit before calling
validate.
Also, more properly handle HTMLCheckFields in the isHidden check by
casting their booleans to strings.
Bug: 68132
Change-Id: I84f8239c299727b773015643048eed4684417733
if ( !empty( $field->mParams['nodata'] ) ) {
continue;
}
+ if ( $field->isHidden( $this->mFieldData ) ) {
+ continue;
+ }
if ( $field->validate(
$this->mFieldData[$fieldname],
$this->mFieldData )
}
$data = $data[$key];
}
- $testValue = $data;
+ $testValue = (string)$data;
break;
}