RequiredValidator consider whitespace as input and not working

Hello Team,

I am using RadzenRequiredValidator from Radzen 2.14.1, when I used it on a text field with whitespace in the textbox, it bypasses the validation.
Could you please suggest if I missed something or if it is a bug or if it is fixed in any version.
https://blazor.radzen.com/requiredvalidator

Thanks,
Shloke Ghenghat.

I have the same issue, is there a solution for this?

I have the same issue, is there a solution for this?

Try CustomValidator and create ur own method to valid ur value

1 Like

Re: "Try CustomValidator"

If a model designates "[Required]" the framework should not allow only white-spaces. That's what's intended 99.999% of the time in CRUD-Land, a place I've spent most my life at. It shouldn't need custom stuff. I'm just the messenger. But thanks for the suggestion regardless.

RadzenRequiredValidator does not work via the Required attribute. It checks if a the component's HasValue property returns true. RadzenDataAnnotationValidator however works with annotation attributes such as Required. It also would trigger on whitespace.