Page
<custom:on_fouce xfdl:compute="toggle(myPAGE.global.focuseditem) == '1' ="

? (set('myPAGE.myAction.active', 'on')) : ''"></custom:on_fouce>
for an alternative approach please refer to this page.
<list sid="myLIST">
<itemlocation>
<x>100</x>
<y>100</y>
<width>500</width>
<height>150</height>
</itemlocation>
<group>ERROR_LIST_GROUP</group>
<value></value>
<custom:on_click xfdl:compute="toggle(value) == '1' and strlen(value) > '0' 

? set('errPAGE.goToError.custom:current_item_ref',value->custom:item_sid) 

+. set('value','') 

+. set('errPAGE.goToError.activated','on') 

: '' ">2</custom:on_click>
</list>
<cell sid="ERROR_0">
<group>ERROR_LIST_GROUP</group>
<value></value>
<custom:item_sid></custom:item_sid>
</cell>
<cell sid="ERROR_1">
.
.
.
<action sid="myAction">
<custom:onActivated xfdl:compute="

(toggle(active, 'off', 'on') == '1') 

? set('custom:counter', '1') 

+.set('custom:invalid_items_total',checkValidFormats('custom:invalid_items_array')) 

+. set('errPAGE.Num_Errors.value',countChildren('custom:invalid_items_array','option')) 

+.((countChildren('custom:invalid_items_array','option')-'1'>'9')?set('custom:numErrors','9') 

: set('custom:numErrors',countChildren('custom:invalid_items_array','option') - '1') )

+. for('custom:counter', '0', '9') 

+. set('active', 'off') 

: ''">2</custom:onActivated>
<custom:numErrors>9</custom:numErrors>
<custom:counter>9</custom:counter>
<custom:forLoopAction xfdl:compute=" 

toggle(custom:counter) == '1' and custom:counter <= custom:numErrors 

? set('errPAGE.ERROR_' + custom:counter + '.custom:item_sid', 

get('custom:invalid_items_array[' + custom:counter + ']')) 

+.((strlen(get(get('custom:invalid_items_array['+ custom:counter +']')+'.value'))!= '0') 

? set('errPAGE.ERROR_' + custom:counter + '.value', get(get('custom:invalid_items_array[' +

custom:counter + ']')+ '.custom:errorMessage') + ' an Invalid form item entry.') 

: set('errPAGE.ERROR_' + custom:counter + '.value', get(get('custom:invalid_items_array[' + 

custom:counter+']')+'.custom:errorMessage')+' a Mandatory form item and it\'s not filled.')) 

: set('errPAGE.ERROR_' + custom:counter + '.custom:item_sid', 'errPAGE.LIST1') 

+. set('errPAGE.ERROR_' + custom:counter + '.value', '') 

">2</custom:forLoopAction>
<custom:invalid_items_total>4</custom:invalid_items_total>
<custom:invalid_items_array>
<ae>a</ae>
<ae>b</ae>
<ae>c</ae>
<ae>d</ae>
</custom:invalid_items_array>
</action>
<custom:invalid_items_array>
<ae>a</ae>
<ae>b</ae>
<ae>c</ae>
<ae>d</ae>
</custom:invalid_items_array>
(bug report: if you enter "2" as the value of the second array entry the code will crash. Could be a bug in the API behind it)
<action sid="goToError">
<active>off</active>
<custom:current_item_ref>a</custom:current_item_ref>
<custom:dest_page_sid>b</custom:dest_page_sid>
<custom:dest_item_sid>c</custom:dest_item_sid>
<custom:onActivated xfdl:compute="

(toggle(activated, 'off', 'on') == '1') 

? set('custom:dest_page_sid', substr(custom:current_item_ref, '0', strstr 

(custom:current_item_ref, '.') - '1')) 

+. set('custom:dest_item_sid', substr(custom:current_item_ref, strstr 

(custom:current_item_ref, '.') + '1', strlen(custom:current_item_ref))) 

+. ((custom:dest_page_sid != getReference('', 'page', 'page')) 

? set('goToPage_BUTTON.custom:next_page', custom:dest_page_sid) 

+. set(custom:dest_page_sid +. '.global.custom:invalid_item', custom:dest_item_sid) 

+. set('goToPage_BUTTON.activated', 'on') 

: set(custom:dest_item_sid +. '.focused', 'on')) 

+. set('active', 'off') 

: ''"></custom:onActivated>
</action>
<custom:invalid_item></custom:invalid_item>
<custom:goTo_invalidItem xfdl:compute="

((toggle(focused, 'off', 'on') == '1') 

and (custom:invalid_item != '') 

) 

? set(custom:invalid_item +. '.focused', 'off') 

+. set(custom:invalid_item +. '.focused', 'on') 

+. set('custom:invalid_item', '') 

: ''"></custom:goTo_invalidItem>
<custom:errorMessage>The field 'Field Name' on 'Field Page' is</custom:errorMessage>
After you apply the given changes to your form you should have an ErrorPage? set up in your form. For more information I have also attached a testform with an ErrorPage? which is created by applying the above changes to the form.
Finally, I should thank and credit this work to the following names which helped me in coding and/or ideas needed to make an
This is YourOwnSandBox topic.
This is a test.
another test