Admin import functional
This commit is contained in:
@@ -89,7 +89,7 @@ namespace MileageTraker.Web.ViewModels.CreateLog
|
||||
public IEnumerable<ValidationResult> Validate(ValidationContext validationContext)
|
||||
{
|
||||
if (LogType == MileageLogType.GasPurchase
|
||||
&& (string.IsNullOrEmpty(GasPurchased) || double.Parse(GasPurchased) == 0))
|
||||
&& (string.IsNullOrEmpty(GasPurchased) || Math.Abs(double.Parse(GasPurchased) - 0) < double.Epsilon))
|
||||
yield return new ValidationResult("Enter amount of gas purchased", new [] {"GasPurchased"});
|
||||
|
||||
if (LogType.Value == 0)
|
||||
|
||||
Reference in New Issue
Block a user