| @@ 89-103 (lines=15) @@ | ||
| 86 | } |
|
| 87 | ||
| 88 | // Check that the top is the right group |
|
| 89 | if ($top->EndID != $field->ID) { |
|
| 90 | $this->validationError( |
|
| 91 | 'FormFields', |
|
| 92 | _t( |
|
| 93 | "UserFormValidator.WRONG_GROUP_END", |
|
| 94 | "'{name}' found closes the wrong group '{group}'", |
|
| 95 | array( |
|
| 96 | 'name' => $field->CMSTitle, |
|
| 97 | 'group' => $top->CMSTitle |
|
| 98 | ) |
|
| 99 | ), |
|
| 100 | 'error' |
|
| 101 | ); |
|
| 102 | return false; |
|
| 103 | } |
|
| 104 | ||
| 105 | // Unnest group |
|
| 106 | array_pop($stack); |
|
| @@ 110-123 (lines=14) @@ | ||
| 107 | } |
|
| 108 | ||
| 109 | // Normal field type |
|
| 110 | if ($conditionalStep && $field->Required) { |
|
| 111 | $this->validationError( |
|
| 112 | 'FormFields', |
|
| 113 | _t( |
|
| 114 | "UserFormValidator.CONDITIONAL_REQUIRED", |
|
| 115 | "Required field '{name}' cannot be placed within a conditional page", |
|
| 116 | array( |
|
| 117 | 'name' => $field->CMSTitle |
|
| 118 | ) |
|
| 119 | ), |
|
| 120 | 'error' |
|
| 121 | ); |
|
| 122 | return false; |
|
| 123 | } |
|
| 124 | } |
|
| 125 | ||
| 126 | return true; |
|