Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

C#

Hamzah Iqbal
seal-mask
.a{fill-rule:evenodd;}techdegree
Hamzah Iqbal
Full Stack JavaScript Techdegree Student 11,145 Points

Valid fields do not show up with green check marks.

I've followed along the course, however, when running the app the valid fields do not show up with green check marks nor does the invalid field show a red "x".

What am I doing wrong?

Here's the layout.cshtml

@{ var applicationName = "Fitness Frog"; }

@helper GetAddEntryButtonVisibility() { if ((string)ViewContext.RouteData.Values["controller"] == "Entries" && (string)ViewContext.RouteData.Values["action"] == "Add") { <text>hidden</text> } else { <text>visible</text> } }

<!DOCTYPE html> <html> <head> <meta charset="utf-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>@ViewBag.Title - @applicationName</title> <link href="~/favicon.ico" rel="shortcut icon" type="image/x-icon"> <link href="~/favicon.ico" rel="icon" type="image/x-icon"> <link href="https://fonts.googleapis.com/css?family=Open+Sans|Secular+One" rel="stylesheet"> @<link href="~/Content/bootstrap.min.css" rel="stylesheet" type="text/css" /> <link href="~/Content/bootstrap-datepicker3.min.css" rel="stylesheet" type="text/css" />@ <link href="~/Content/site.css" rel="stylesheet" type="text/css" /> <script src="~/Scripts/modernizr-2.6.2.js"></script> </head> <body> <div class="navbar navbar-inverse navbar-fixed-top"> <div class="container"> <div class="navbar-header"> <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse"> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> </button> <a class="navbar-brand" href="@Url.Action("Index", "Entries")"> @Html.Partial("_Logo", new ViewDataDictionary { { "element-id", "logo" } }) @applicationName </a> </div> <div class="navbar-collapse collapse"> <ul class="nav navbar-nav"> </ul> <a href="@Url.Action("Add", "Entries")" style="visibility: @GetAddEntryButtonVisibility()" class="btn btn-primary navbar-btn navbar-right"> <span class="glyphicon glyphicon-plus"></span> Add Entry </a> </div> </div> </div>

<div class="container body-content">
    @RenderBody()
    <footer>
        @Html.Partial("_Logo", new ViewDataDictionary { { "element-id", "footer_logo" } })
        <p>&copy; @DateTime.Now.Year @applicationName, All Rights Reserved.</p>
    </footer>
</div>

<script src="~/Scripts/jquery-1.10.2.min.js"></script>
<script src="~/Scripts/jquery.validate.min.js"></script>
<script src="~/Scripts/jquery.validate.unobtrusive.min.js"></script>
<script src="~/Scripts/jquery.validate.bootstrap.js"></script>
<script src="~/Scripts/bootstrap.min.js"></script>
<script src="~/Scripts/bootstrap-datepicker.min.js"></script>
<script>
         $('input.datepicker').datepicker({
        format: 'm/d/yyyy'

         });

</script>

</body> </html>

It looks like this question was improperly tagged, try asking again with the correct tags so people who know how to solve the question find out about it first signed by totally not a robot