Validation Error Message Not Displaying in dataform ValidateProperty Event

Hello,

I'm encountering an issue with the dataform validateProperty event in SfDataform. I'm setting the validation result using:

e.ErrorMessage = "Error Message"
e.IsValid = false

While IsValid is set to false and ErrorMessage is provided, the actual validation error message does not appear in the UI. I have confirmed that:

The ValidationMode is set to OnLostFocus.

The property name in the model matches the property name in the event.

The DataObject assigned to the SfDataForm has the corresponding property .

No custom templates are overriding the default validation message display.

Despite these checks, the field does not display the expected validation error message. The property is validated correctly, but the error message is never shown.

Could you please provide guidance on why the error message might not be appearing and what additional steps are required to ensure that the validation error is displayed?

Thank you for your assistance.


4 Replies

VM Vidyalakshmi Mani Syncfusion Team December 10, 2024 01:52 PM UTC

Hi Youssef,


Thank you for reaching out. To better assist you, could you please specify which LayoutType (Default or TextInputLayout) you are using in the DataForm and on which platform (Windows, Android, macOS, or iOS) you are encountering the issue?


Regards,

Vidyalakshmi M.




YJ Youssef Juma December 10, 2024 01:54 PM UTC

Hi  Vidyalakshmi,

I'm using TextInputLayout on Windows.

Regards,
Youssef Juma



VM Vidyalakshmi Mani Syncfusion Team December 13, 2024 02:15 PM UTC

Hi Youssef,


We have found and fixed the reported issue from our end. We will include the issue fix in our weekly NuGet which is scheduled for December 24, 2024. We will notify you once the weekly NuGet is available. We appreciate your patience until then.


Regards,

Vidyalakshmi M.




VM Vidyalakshmi Mani Syncfusion Team December 24, 2024 11:16 AM UTC

Hi Youssef,


We have fixed the reported issue and included the issue fix in our latest weekly NuGet release update version 28.1.36, which is available for download at nuget.org


Root cause: The issue was due to the validation result from the `ValidateProperty` event not being handled properly, causing the error message to not appear in the UI.


We thank you for your support and appreciate your patience in waiting for this release. Please get in touch with us if you require any further assistance.


Regards,

Vidyalakshmi M.



Loader.
Up arrow icon