View Model Input Validation with MVVMCross.

LewisElliottLewisElliott GBMember


What are people using in their Mvvmcross apps for view model validation?

I've seen this plugin: but I don't believe it works with the latest version of MVVMCross/ there is very little documentation on it.

Has anyone found any alternatives?




  • LewisElliottLewisElliott GBMember


  • JamesGreen.8031JamesGreen.8031 GBMember ✭✭
    edited June 2015

    I've been looking at this as well.

    I'm at the very early stages of development where I'm basically getting all my patterns established and this is all I can find in terms of pre-rolled VM validation.

    Stuart Lodge that wrote MvvmCross was sufficiently impressed with it that he doesn't appear to have done anything about validation since Jan 2014 so ... I'm just about to have a pop at incorporating it into my app.

    It's also very out of date with the current release of MvvmCross which is disappointing. It seems it was "updated" a month ago but left the very old dependency intact. The NuGet version is over a year old as well.

    I'm currently updating it.

  • JamesGreen.8031JamesGreen.8031 GBMember ✭✭

    In fact this is an extremely poorly managed project.

    Opening it in VS2012 keeps added loads of unrequired classes checked in that shouldn't be there for instance.

    I think I'm just going to pull all the code into my solution and be done with it. Nuget keeps crashing trying to update the damn thing and I'm getting fed up with it all frankly. I have work to do!

  • LewisElliottLewisElliott GBMember

    You may find a few issues with the version of Mvvmcross that the project is using along with some hard references in there as well.

    I've been looking at porting this to the latest version of Mvvmcross and I think it will involve a rewrite to support the changed bindings from version 3.1.

    Do let me know if you get it working though, I'd be up working on it too if we could get a github setup, I'm off on holiday for two weeks tomorrow. When I'm back ill be willing to have a look though.

  • JamesGreen.8031JamesGreen.8031 GBMember ✭✭

    I was just about to post the same thing. This is dead in the water due to just not being able to find the IMvxBindingContext interface. A rewrite indeed ...

    Strange this is I can even view that Interface in the GitHub repository but where it actually is in the libraries beats me. I cannot get any of this to work.

    Sad. Means that there really is NO validation for MvvmCross at all.

    I guess that's why the project is more or less dormant. I'd be up for helping out on that. Lets talk again when you get back from holiday.

    This is me on GitHub.

  • JamesGreen.8031JamesGreen.8031 GBMember ✭✭

    I'm ditching this work for now I don't have the time to look at this right now. Besides I'm working on a real project and do not need to start messing with this in that context so I'll start a much smaller solution and see what happens.

  • LewisElliottLewisElliott GBMember

    Hi James,

    Did you get any further with this?

    Just looking at getting back into my xamarin project again now...!

  • JeremyKolbJeremyKolb USMember ✭✭✭

    What's the problem exactly? IMvxBindingContext exists:✓&q=IMvxBindingContext

    It looks like the source was last updated in May so it should work with the latest mvvmcross stable.

  • JamesGreen.8031JamesGreen.8031 GBMember ✭✭

    I ended up going with a custom implementation making use of FluentValidation in the end.

  • LewisElliottLewisElliott GBMember

    Do you have a quick example of how you got FluentValidation to play with your view model and your view (showing the errors).


Sign In or Register to comment.