public RegisterPageViewModel(IMessageBoxService messageBoxService, IEventAggregator eventAggregator, IoCProxy ioc) : base(messageBoxService, eventAggregator, ioc) { AddValidationRule(() => Email).Condition(() => !EmailValidation.Check(Email)).Message("-"); AddValidationRule(() => Password).Condition(() => string.IsNullOrEmpty(Password)).Message("-"); AddValidationRule(() => RepeatPassword).Condition(() => string.IsNullOrEmpty(RepeatPassword)).Message("-"); AddValidationRule(() => FirstName).Condition(() => string.IsNullOrEmpty(FirstName)).Message("-"); AddValidationRule(() => Surname).Condition(() => string.IsNullOrEmpty(Surname)).Message("-"); }
public LoginPageViewModel(IMessageBoxService messageBoxService, IEventAggregator eventAggregator, IoCProxy ioc) : base(messageBoxService, eventAggregator, ioc) { AddValidationRule(() => Email) .Condition(() => !EmailValidation.Check(Email)) .Message("-"); AddValidationRule(() => Password) .Condition(() => string.IsNullOrEmpty(Password)) .Message("-"); #if DEBUG // Pro účely ladění a vývoje. Zadávat furt heslo je otravný. Email = "*****@*****.**"; Password = "******"; #endif }