Model Validation

What’s the best way to do model validation without having 2 different methods to do validation. I already have Aurelia-Validation setup and it works great on the front-end. I want to be able to use the same rules to validate my models. I have a publish process that will look through a large number of items that all have different models. Just before publish I need to ensure everything is valid. I’m just looking for some outside ideas before getting off in the weeds.

Your question makes me assume you want to validate your models in the backend. Is that a good guess?

Correct. It’s a final check before making the service call. I don’t need any UI representation. There’s no way since the models are spread over many pages. A list of errors may be nice, but that’s a nice to have at this point.

If you don’t mind, can have a look of my validation Iib. I didn’t do any marketing (because I am not a social guy) so it’s definitely not a popular tool. But I am very confident about the capability and flexibility, as well as the code quality. It seems to match your requirement well.


@TylerJPresley - what ‘technology’ are you using on the backend? Is it Javascript as well, or something else?