6
Reply

which namespace is required in MVC for validation?

Yogesh Bajpai

Yogesh Bajpai

Apr 02, 2013
3.6k
0

    system.Componetmodel.dataanotation

    Ashish Kumar Jaiswal
    December 06, 2016
    1

    System.ComponentModel.DataAnnotations Namespace

    Ranjeet Patel
    February 20, 2014
    1

    System.ComponentModel.DataAnnotations Example : using System.ComponentModel.DataAnnotations; namespace SuperheroSample.Models { public class Superhero { [Required] public string Name { get; set; } public bool WearsCape { get; set; } } }

    Rajkumar Rajigounder
    April 01, 2015
    0

    System.ComponentModel.DataAnnotations

    Bhabani Prasad
    May 23, 2014
    0

    System.ComponentModel.DataAnnotations

    yashlok kumar
    May 17, 2014
    0

    If you want to perform model validation using DataAnnotations Attributes, you must include System.ComponentModel.DataAnnotations name space. there are many DataAnnotation attributes are in MVC for validation Please refer below link for more details. http://msdn.microsoft.com/en-us/library/system.componentmodel.dataannotations(v=vs.100).aspx

    Jignesh Trivedi
    April 14, 2014
    0