Validation issue, caliburn micro updatesource

Mar 14, 2011 at 2:14 PM

Hi, I'm trying to validate some form by using in the view the NotifyOnValidationError=True, ValidatesOnExceptions=True properties, I'm validation in the property bindend to the view in the ViewModel by using i.e,

[Required(ErrorMessage = "Login Required")]
        public string Login
        {
           get 
           {
              return login;              
           }
           set
           {
              Validator.ValidateProperty(value,
                    new ValidationContext(this, null, null) { MemberName = "Login" });
              login = value;
              NotifyOfPropertyChange("Login");
           }
        }


But I'm getting troubles when the fields are leave empty and the ok button is clicked because the validation in the property isn't made, I've read I could use
UpdateSource to the binded property however I actually don't figure how to make that in CM, if you have some example about do that it will be very appreciate,

Thanks in advance.