Skip to content

Validations on components #1666

Answered by msynk
RezaKargar asked this question in Q&A
Discussion options

You must be logged in to vote

Hello Reza,

thanks for submitting this discussion and introducing this important topic.

first of all only the input components can have validation infrastructure in them.
input components are all components that in a way are receiving a specific value from the user interaction.

and secondly, the base class should be BitInputBase<T> type.

other parts of your demonstration are correct.

in order to test the validation, you need a separate test .razor file with a specific EditForm component in it and a model with .net validation enabled (through DataAnnotation attributes or any other ways).
(we have a sample coming up in a PR that is under review atm)

The dispose method should be used like an…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by ysmoradi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
2 participants