Comment le programme d'installation MVC 5 discrète validation correctement lors de l'ajout de la forme d'un appel AJAX?

J'ai googeld sur ce problème et j'ai vérifié de mon site web.config, bundleconfig et ma mise en page qui ressemble à ceci:
web.config:

<appSettings>
    <add key="webpages:Version" value="3.0.0.0" />
    <add key="webpages:Enabled" value="false" />
    <add key="ClientValidationEnabled" value="true" />
    <add key="UnobtrusiveJavaScriptEnabled" value="true" />
</appSettings>

Dans mon App_Start dossier sous "BundleConfig.cs":

        var jqueryBundle = new ScriptBundle("~/bundles/jquery");
        jqueryBundle.Include("~/Scripts/jquery-{version}.js");
        jqueryBundle.Include("~/Scripts/moment.min.js");
        jqueryBundle.Include("~/Scripts/loadingoverlay.js");
        jqueryBundle.Include("~/Scripts/fullcalendar.js");
        jqueryBundle.Include("~/Scripts/lang-all.js");
        jqueryBundle.Transforms.Add(jsTransformer);
        jqueryBundle.Orderer = nullOrderer;
        bundles.Add(jqueryBundle);

var jqueryvalBundle = new ScriptBundle("~/bundles/jqueryval");
jqueryvalBundle.Include("~/Scripts/jquery.valider*");
jqueryvalBundle.Include("~/Scripts/jquery.validate.js");
jqueryvalBundle.Include("~/Scripts/jquery.validate.unobtrusive.js");
jqueryvalBundle.Transforme.Ajouter(jsTransformer);
jqueryvalBundle.Donneur d'ordre = nullOrderer;
les faisceaux.Ajouter(jqueryvalBundle);

dans ma page de présentation:

@Scripts.Render("~/bundles/jquery")
@Scripts.Render("~/bundles/jqueryval")
@Scripts.Render("~/bundles/bootstrap")

Firebug affiche:

Comment le programme d'installation MVC 5 discrète validation correctement lors de l'ajout de la forme d'un appel AJAX?

Jusqu'à présent tout est inclus et shouold être en cours d'exécution en douceur.

Mon modèle:

   [DisplayName("Förnamn")]
    [Required(ErrorMessage = "Vänligen ange ett förnamn")]
    [StringLength(100)]
    public string FirstName { get; set; }
    [DisplayName("Efternamn")]
    [Required(ErrorMessage = "Vänligen ange ett efternamn")]
    [StringLength(100)]
    public string LastName { get; set; }
    [DisplayName("E-post")]
    [Required(ErrorMessage = "Vänligen ange epost")]
    [StringLength(100)]
    [EmailAddress(ErrorMessage = "Ange en korrekt e-postaddress")]
    public string Email { get; set; }
    [DisplayName("Mobil")]
    [DataType(DataType.PhoneNumber)]
    public string PhoenNumber { get; set; }
    [DataType(DataType.Password)]
    [DisplayName("Lösenord")]
    public string PassWord { get; set; }

Mon point de vue:

<div class="col-md-4 col-xs-12">
        @using (Html.BeginForm(null, null, FormMethod.Post, new { id = "credentialsForm" }))
        {
            @Html.AntiForgeryToken()

            <div class="form-horizontal">
                @Html.ValidationSummary(true, "", new { @class = "text-danger" })
                <div class="form-group createCustomerFormGroup">
                    @Html.LabelFor(model => model.FirstName, htmlAttributes: new { @class = "control-label col-md-3" })
                    <div class="col-md-9">
                        @Html.EditorFor(model => model.FirstName, new { htmlAttributes = new { @class = "form-control", @name = "FirstName" } })
                        @Html.ValidationMessageFor(model => model.FirstName, "", new { @class = "text-danger" })
                    </div>
                </div>

                <div class="form-group createCustomerFormGroup">
                    @Html.LabelFor(model => model.LastName, htmlAttributes: new { @class = "control-label col-md-3" })
                    <div class="col-md-9">
                        @Html.EditorFor(model => model.LastName, new { htmlAttributes = new { @class = "form-control" } })
                        @Html.ValidationMessageFor(model => model.LastName, "", new { @class = "text-danger" })
                    </div>
                </div>

                <div class="form-group createCustomerFormGroup">
                    @Html.LabelFor(model => model.Email, htmlAttributes: new { @class = "control-label col-md-3" })
                    <div class="col-md-9">
                        @Html.EditorFor(model => model.Email, new { htmlAttributes = new { @class = "form-control" } })
                        @Html.ValidationMessageFor(model => model.Email, "", new { @class = "text-danger" })
                    </div>
                </div>

                <div class="form-group createCustomerFormGroup">
                    @Html.LabelFor(model => model.PassWord, htmlAttributes: new { @class = "control-label col-md-3" })
                    <div class="col-md-9">
                        @Html.EditorFor(model => model.PassWord, new { htmlAttributes = new { @class = "form-control" } })
                        @Html.ValidationMessageFor(model => model.PassWord, "", new { @class = "text-danger" })
                    </div>
                </div>

                <div class="form-group createCustomerFormGroup">
                    @Html.LabelFor(model => model.PhoenNumber, htmlAttributes: new { @class = "control-label col-md-3" })
                    <div class="col-md-9">
                        @Html.EditorFor(model => model.PhoenNumber, new { htmlAttributes = new { @class = "form-control" } })
                        @Html.ValidationMessageFor(model => model.PhoenNumber, "", new { @class = "text-danger" })
                    </div>
                </div>
            </div>
        }
</div>

un champ dans le formulaire via firebug:
Comment le programme d'installation MVC 5 discrète validation correctement lors de l'ajout de la forme d'un appel AJAX?

J'exécute ce script dans firebug et je n'ai pas les erreurs, même si il devrait y avoir des erreurs, car certains champs sont obligatoires, mais ils n'ont pas de valeur:

$("#credentialsForm").validate().numberOfInvalids()
//retunrs 0

$("#credentialsForm").validate().valid()
//returns true

Ive été à ce pendant des heures et im going nuts droit maintenant, ce qui me manque?

EDIT: modification de la question de "Comment configurer MVC 5 discrète validation correctement" à son titre actuel, puisqu'il décrit ce que je cherchais, mieux que le titre précédent.

Lorsque la page est affichée, ouvrez le navigateur de l'éditeur et de vérifier si le code html des règles de validation sont-elles générées?
Je assum vous referig à ceci: i.stack.imgur.com/NDZbE.png l'Image est aussi dans la question

OriginalL'auteur ThunD3eR | 2015-10-13