From 7eb5623d25fd8949cf7fa1e8608535cd170e1e62 Mon Sep 17 00:00:00 2001 From: "Matthew D. Groves" Date: Sat, 18 Dec 2010 13:45:57 -0600 Subject: [PATCH] added additional validation to add/edit portfolio --- MonoStockPortfolio/EditPortfolioActivity.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/MonoStockPortfolio/EditPortfolioActivity.cs b/MonoStockPortfolio/EditPortfolioActivity.cs index 68cffa8..95b4392 100644 --- a/MonoStockPortfolio/EditPortfolioActivity.cs +++ b/MonoStockPortfolio/EditPortfolioActivity.cs @@ -68,6 +68,7 @@ namespace MonoStockPortfolio private bool Validate(Portfolio portfolioToSave) { var validator = new FormValidator(); + validator.AddRequired(PortfolioName, "Please enter a portfolio name"); validator.AddValidation(PortfolioName, () => IsDuplicateName(portfolioToSave)); var result = validator.Apply();