Salesforce

mgError (Magic xpa 4.x)

« Go Back

Information

 
Created BySalesforce Service User
Approval Process StatusPublished
Objective
Description

mgError

This is a custom tag to handle the control-related errors.

The tag mgError is added immediately below the input control.

The existing div related to *ngIf is removed and replaced with mgError custom tag.

<div *ngIf="(screenFormGroup.get('Integer').dirty) && (screenFormGroup.get('Integer').hasError('pattern')

|| screenFormGroup.get('Integer').hasError('required') )">

<p>{{ mg.getErrMsg('Integer') }}</p>

</div>

<mgError magic="Integer"> </mgError>

A component ErrorMagicComponent is introduced, which handle the errors generated by the html elements.

Since version: 4.5

You can write a custom error messages using mgError tag.

<mgError magic="Field1">This is a custom error message. </mgError>

If there is no custom error message provided between mgError and /mgError tags, xpa flashes default error.

Since version: 4.5a

Reference
Attachment 
Attachment