Skip to content

Instantly share code, notes, and snippets.

@waldyrfelix
Created June 22, 2011 15:21
Show Gist options
  • Save waldyrfelix/1040326 to your computer and use it in GitHub Desktop.
Save waldyrfelix/1040326 to your computer and use it in GitHub Desktop.
Exemplo de Required aplicado
using System.ComponentModel.DataAnnotations;
namespace AppWeb.ViewModels
{
public class LoginViewModel
{
[Required(ErrorMessage = "Login é um campo obrigatório")]
public string Login { get; set; }
[Required(ErrorMessage = "Senha é um campo obrigatório")]
public string Senha { get; set; }
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment