How can I connect data annotation with custom validator?

How can I use my own validator and data annotation in this same moment?

If I add my own validator, the data annotation stops working.


Example

https://blazorplayground.syncfusion.com/embed/rtBpXpDSAKgNxdvy?appbar=true&editor=true&result=true&errorlist=true&theme=bootstrap5


I can add empty row. Attribute [Required] doesn't work


1 Reply

VN Vignesh Natarajan Syncfusion Team April 8, 2024 07:04 AM UTC

Hi Tomasz,


Thanks for contacting Syncfusion support.t


Query: “How can I use my own validator and data annotation in this same moment?


We suggest you to use either one of support (Validator component or Data Annotation) to achieve your requirement. It is not possible to use both simultaneously in Grid component. If you want to implement your own custom validation logic while using Data annotation, we request you to refer to the below documentation for your reference.


https://blazor.syncfusion.com/documentation/datagrid/column-validation#custom-validation


Please get back to us if you have further queries.


Regards,

Vignesh Natarajan


Loader.
Up arrow icon