Validation attributes
See original GitHub issueWould like to see something to be able to generate validation attributes among with model classes. It would be really cool.
My view model looks like this:

I got my api like this:

I am thinking about to implement client validation using vuelidate or VeeValidate
Is there any way to somehow translate model attributes using swagger-axios-codegen and use them in validation?
Any ideas?
Issue Analytics
- State:
- Created 4 years ago
- Comments:7 (3 by maintainers)
Top Results From Across the Web
ValidationAttribute Class (System.ComponentModel ...
This class enforces validation, based on the metadata that is associated with the data table. You can override this class to create custom...
Read more >Validation Attributes | ASP.NET Core Controls
Validation Attributes ; Compare, Validates that two properties in a model match. Built-in ; Range, Validates that a property value falls within a ......
Read more >Client-side form validation - Learn web development | MDN
This is done by using validation attributes on form elements. We've seen many of these earlier in the course, but to recap:.
Read more >Validation Attributes - powershell.one
Validation attributes monitor and make sure values assigned to variables and parameters meet your requirements. And they can do plenty more!
Read more >Data Validation in ASP.NET MVC - TutorialsTeacher
Validation using Data Annotation Attributes ; StringLength, Specifies the minimum and maximum length of characters that are allowed in a string type property....
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Maybe it could be something like this?
codegen output:
It is interesting how easy we can bind the validation model with the vuelidate or VeeValidate.
vuelidate example (not sure it will work):
vee-validate example (not sure it will work):
Yes you can close. The most important things are covered. If someone needs more validation he/she can raise a new issue.