Hi Team ,
.NET core API Fluent Validation Dynamically how set in model class and difference condition is it possible ?any example article or resources please share
Hi Team ,
.NET core API Fluent Validation Dynamically how set in model class and difference condition is it possible ?any example article or resources please share
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Prasad RaveendranPosted Jun 30, 2024, 7:08 PM
Hello Jubin,
I would appreciate if you could provide more insights on how you are expecting fluent validation dynamically set on model classes.
Jaimin ShethiyaPosted Jun 29, 2024, 2:07 PM
Hello Jobin,
Hope below code good for you.
Output
Thanks
Jaimin ShethiyaPosted Jun 28, 2024, 3:45 PM
Hello Jobin,
You need to use a reflection and try to create an object and invoke that method.
I used this in my one of the organisation.
Try this way,
Hope it will help you.
Thanks
Jobin SPosted Jun 28, 2024, 2:38 AM
yes jaimin ,
request validate in dynamically ? any options here fluent validation?
Jaimin ShethiyaPosted Jun 28, 2024, 2:04 AM
Hello Jobin,
You mean to say based on the request, automatically identified the fluent validation class and validate that request.
This is my understanding correct?
Jobin SPosted Jun 27, 2024, 4:45 PM
Dynamically validation set in request model class options here in Fluent validation
Jaimin ShethiyaPosted Jun 27, 2024, 3:26 AM
Hello Jobin,
Can you more elaborate your requirement so we are understand and give an idea.
Thanks