Dynamic Custom Validator

Hi Team,

How can we implement a Custom Validator to be triggered at the time of Submitting a form?
My situation is like, in some situation a control can be left as blank but in some situation there should be a value. So I tried by placing a Custom Validator to the UI. But it didn't worked; as the page is unable to recognize the custom-validator tag. is id already deprecated? or am i missing something?

My idea is to show the validator message while submitting a page by checking some condition in script code.

Thank you

You can check the custom validator demo.

What does that mean?


When I used the <RadzenCustomValidator ........ /> in the page
the complier says "Found markup element with unexpected name RadzenCustomValidator"
I have used "@using Radzen" on top of the page. But it's still showing the above error message.

You will need @using Radzen.Blazor as well for sure.