Skip to content

Commit

Permalink
Fix validation span tags for Create and Edit pages.
Browse files Browse the repository at this point in the history
Fixes #227
Fixes #228
  • Loading branch information
prafullbhosale committed Jun 23, 2016
1 parent 260bc0b commit f2162a8
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;

@{string modelName = (Model.ClassName.EndsWith("Controller")? Model.ClassName.Substring(0,Model.ClassName.Length-10): Model.ClassName);}
namespace @Model.NamespaceName
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@
@:<label asp-for="@property.PropertyName" class="col-md-2 control-label"></label>
@:<div class="col-md-10">
@:<select asp-for="@property.PropertyName" class="form-control"></select>
@:<span asp-validation-for="@property.PropertyName" class="text-danger" />
@:<span asp-validation-for="@property.PropertyName" class="text-danger"></span>
@:</div>
@:</div>
}
Expand All @@ -90,7 +90,7 @@
@:<label asp-for="@property.PropertyName" class="col-md-2 control-label"></label>
@:<div class="col-md-10">
@:<input asp-for="@property.PropertyName" class="form-control" />
@:<span asp-validation-for="@property.PropertyName" class="text-danger" />
@:<span asp-validation-for="@property.PropertyName" class="text-danger"></span>
@:</div>
@:</div>
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
@:<label asp-for="@property.PropertyName" class="control-label col-md-2"></label>
@:<div class="col-md-10">
@:<select asp-for="@property.PropertyName" class="form-control" asp-items="[email protected]"></select>
@:<span asp-validation-for="@property.PropertyName" class="text-danger" />
@:<span asp-validation-for="@property.PropertyName" class="text-danger"></span>
@:</div>
@:</div>
continue;
Expand Down Expand Up @@ -96,7 +96,7 @@
@:<label asp-for="@property.PropertyName" class="col-md-2 control-label"></label>
@:<div class="col-md-10">
@:<input asp-for="@property.PropertyName" class="form-control" />
@:<span asp-validation-for="@property.PropertyName" class="text-danger" />
@:<span asp-validation-for="@property.PropertyName" class="text-danger"></span>
@:</div>
@:</div>
}
Expand Down

0 comments on commit f2162a8

Please sign in to comment.