MinValue MaxValue and 0

Dear Syncfusion,


Ik have a question in case of the validation in the grid.

I am using the build in Validation for Min and Max value and Require = false.

But because it is false I want that when zero is filled in it also counts because than it means that this column is not used. It works when I remove the zero (and than it would default back to zero). Is there a way within the validation or grid that something like this is possible or do I need to make a custom validator for something like this?


Kind regards,

Bossink


3 Replies 1 reply marked as answer

MS Monisha Saravanan Syncfusion Team June 6, 2022 01:04 PM UTC

Hi Bossink,


Greetings from Syncfusion support.


We have checked your query and we suspect that you are using min value and max value as a validation for a numeric column and set required type as false but when you edit the column and enter the value as zero then it throws validation error considering zero as a value.  If so we would suggest you to use custom validation of DataGrid. Because by using min and max value will consider zero as an value and will throw validation error.


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


If we misunderstood your query or if you have further queries then kindly get back to us. As always we will be happy to help you.


Regards,

Monisha


Marked as answer

BO bossink June 7, 2022 07:09 AM UTC

Hello Syncfusion,


I thought that this might be the case. Thank you for confirming this. I will use custom validation instead.


Kind regards,


Bossink



MS Monisha Saravanan Syncfusion Team June 8, 2022 09:30 AM UTC

Hi Bossink,


Welcome.


Kindly get back to us if you have further queries. As always we will be happy to help you.


Regards,

Monisha


Loader.
Up arrow icon