Validations on components #1666
-
Hi to all 👋 I just opened this discussion to have some sort of Q&A discussion 😁🤷♂️ I saw some issues about implementing the validations for some components,
I know this may be long but there are some more unknowns for me:
I'll be so grateful if you help me on this, |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
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. and secondly, the base class should be other parts of your demonstration are correct. in order to test the validation, you need a separate test The dispose method should be used like any other classes in .net, whenever you need to dispose of something 😉 |
Beta Was this translation helpful? Give feedback.
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 specificEditForm
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…