From 759880e5ee251e93cba855a62f62ad2ac507d06c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rasmus=20Eeg=20M=C3=B8ller?= Date: Thu, 28 Feb 2019 20:22:35 +0100 Subject: [PATCH] Updated on how to use client dependency --- README.md | 34 ++++++++++++++++++++++++++++++---- 1 file changed, 30 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index e18304c..81672bd 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ -[![Build status](https://ci.appveyor.com/api/projects/status/45focfae616jwy59/branch/master?svg=true)](https://ci.appveyor.com/project/rasmuseeg/our-umbraco-dataannotations/branch/master) -[![Build status](https://ci.appveyor.com/api/projects/status/45focfae616jwy59/branch/develop?svg=true)](https://ci.appveyor.com/project/rasmuseeg/our-umbraco-dataannotations/branch/develop) +| Branch | Status | +|:--------|:-------| +| master | [![Build status](https://ci.appveyor.com/api/projects/status/45focfae616jwy59/branch/master?svg=true)](https://ci.appveyor.com/project/rasmuseeg/our-umbraco-dataannotations/branch/master) | +| develop | [![Build status](https://ci.appveyor.com/api/projects/status/45focfae616jwy59/branch/develop?svg=true)](https://ci.appveyor.com/project/rasmuseeg/our-umbraco-dataannotations/branch/develop) | # Our.Umbraco.DataAnotations Contains model validation attributes to for your properties, by using umbraco dictionary as the resource for error messages. @@ -17,9 +19,33 @@ PM > Install-Package Our.Umbraco.DataAnnotations Include the following scripts in your layout .cshtml file ``` - - + + @RenderBody() + + + + +``` + +or using ClientDependency like so: ``` +@using ClientDendency.Core.Mvc; + +... + + + @RenderBody() + + @{ + Html.RequiresJs("https://cdnjs.cloudflare.com/ajax/libs/jquery-validate/1.18.0/jquery.validate.min.js") + Html.RequiresJs("https://cdnjs.cloudflare.com/ajax/libs/jquery-validation-unobtrusive/3.2.11/jquery.validate.unobtrusive.min.js") + } + @Html.RenderJsHere() + + +``` + +The above is just samples, you may use any method you like to include the scripts. Then on each page with a form enable validation ```