示例#1
0
文件: OptionsView.cs 项目: paulyc/vrs
        private bool Validate(Options options, ViewModel viewModel)
        {
            var controller        = new OptionsController();
            var validationResults = controller.DoValidation(options);

            var validationHelper = new ValidationModelHelper();

            validationHelper.ApplyValidationResults(validationResults, viewModel);

            return(!validationResults.HasErrors);
        }