mirror of
https://github.com/mgroves/MonodroidStockPortfolio.git
synced 2024-12-24 03:00:21 +00:00
added additional validation to add/edit portfolio
This commit is contained in:
parent
1e7dde035b
commit
7eb5623d25
1 changed files with 1 additions and 0 deletions
|
@ -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();
|
||||
|
|
Loading…
Reference in a new issue