Unobtrusive validation demo

Awesome controls are designed to support jquery.validate and unobtrusive validation.
The default date format and decimal separator are set in aweUtils.js init method (if jquery.validate is referenced, aweUtils.init is called by Html.Awe().Init() in _Layout.cshtml).

click the submit button to see the validation

@using (Html.BeginForm())
@Html.EditorFor(o => o.Name)
@Html.EditorFor(o => o.Number)
@Html.EditorFor(o => o.MealAuto)
@Html.EditorFor(o => o.Date)
@Html.EditorFor(o => o.DateTime1)
@Html.EditorFor(o => o.DateTimeSeconds1)
@Html.EditorFor(o => o.Time1)
@Html.EditorFor(o => o.TimeSeconds1)

<div style="min-height: 187px">
@Html.EditorFor(o => o.Categories)
<div style="min-height: 187px">
@Html.EditorFor(o => o.Category2)

@Html.EditorFor(o => o.CategoryFo)
@Html.EditorFor(o => o.Meal)
@Html.EditorFor(o => o.Meals)
@Html.EditorFor(o => o.MealsOdd)
@Html.EditorFor(o => o.MealsOddFavs)
@Html.EditorFor(o => o.CategoryBgrId)
@Html.EditorFor(o => o.CategoriesBgcIds)
@Html.EditorFor(o => o.CategoriesMultiIds)
@Html.EditorFor(o => o.ColorId)
@Html.EditorFor(o => o.MealComboId)
@Html.EditorFor(o => o.Organic)
@Html.EditorFor(o => o.Organic2)
@Html.EditorFor(o => o.Organic3)
@Html.EditorFor(o => o.OrganicSim)
<div class="esubmit">
<input type="submit" value="submit" class="awe-btn" />
<h4>click the submit button to see the validation</h4>
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using Microsoft.AspNetCore.Mvc;

using Omu.AwesomeMvc;

namespace AweCoreDemo.ViewModels.Input
public class UnobtrusiveInput
[AweMeta("placeholder", "write something")]
[AweMeta("maxLength", 13)]
public string Name { get; set; }

[AweMeta("placeholder", "only numbers here")]
[AweMeta("decimals", 2)]
[DisplayName("Numeric textbox")]
public float? Number { get; set; }

[AweMeta("placeholder", "try Mango")]
[AweMeta("controller", "Data")]
[AweMeta("action", "MealAutocomplete")]
public string MealAuto { get; set; }

[AweMeta("Placeholder", "pick a date")]
public DateTime? Date { get; set; }

[AweMeta("Placeholder", "date and time")]
public DateTime? DateTime1 { get; set; }

[AweMeta("Placeholder", "date and time")]
[DisplayName("DateTimePicker with seconds")]
public DateTime? DateTimeSeconds1 { get; set; }

public DateTime? Time1 { get; set; }

[DisplayName("TimePicker with seconds")]
public DateTime? TimeSeconds1 { get; set; }

[AweUrl(Action = "GetCategories", Controller = "Data")]
public IEnumerable<int> Categories { get; set; }

[AweUrl(Action = "GetCategories", Controller = "Data")]
public int? Category2 { get; set; }

[AweUrl(Action = "GetCategoriesFirstOption", Controller = "Data")]
public int? CategoryFo { get; set; }

[AweMeta("ClearButton", true)]
public int? Meal { get; set; }

[AweMeta("ClearButton", true)]
public IEnumerable<int> Meals { get; set; }

[AweUrl(Action = "GetAllMeals", Controller = "Data")]
public int? MealsOdd { get; set; }

[DisplayName("DropdownList Favs")]
[AweUrl(Action = "GetAllMeals", Controller = "Data")]
public int? MealsOddFavs { get; set; }

[AweUrl(Action = "GetCategories", Controller = "Data")]
public int? CategoryBgrId { get; set; }

[DisplayName("ButtonGroup Multi")]
[AweUrl(Action = "GetCategories", Controller = "Data")]
public int[] CategoriesBgcIds { get; set; }

[AweUrl(Action = "GetCategories", Controller = "Data")]
public int[] CategoriesMultiIds { get; set; }

public string ColorId { get; set; }

[AweUrl(Action = "GetAllMeals", Controller = "Data")]
public string MealComboId { get; set; }

public bool Organic { get; set; }

[Required(ErrorMessage = "This must be checked, in order to submit the form")]
[DisplayName("Checkbox (Required)")]
public bool Organic2 { get; set; }

[Required(ErrorMessage = "This must be Yes, in order to submit the form")]
[DisplayName("Toggle Button")]
public bool Organic3 { get; set; }

[Required(ErrorMessage = "This must be checked, in order to submit the form")]
public bool OrganicSim { get; set; }