Skip to content

Commit a326af2

Browse files
committed
Fixed issue that could cause validate() to receive values of previous visit to tab when current form is saved.
1 parent 12a4987 commit a326af2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Dataface/FormTool.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -1225,7 +1225,7 @@ function validateRecordForm($record, &$form, $new=false, $tab=null){
12251225
}
12261226
foreach ($tabforms as $tabname=>$currForm) {
12271227
$currForm->_flagSubmitted = true;
1228-
if ( !$currForm->validate($submittedValues) ){
1228+
if ( !$currForm->validate(($currForm === $form) ? null : $submittedValues) ){
12291229
if ($currForm !== $form) {
12301230
$errorMessage = df_translate('classes.FormTool.errors.ERROR_IN_TAB', 'A validation error occurred in the '.$tabs[$tabname]['label'].' tab. Please verify that this tab\'s input is correct before saving.', array('tab'=>$tabs[$tabname]['label']));
12311231
foreach ($currForm->_errors as $error) {

0 commit comments

Comments
 (0)