Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Web;
- using System.ComponentModel.DataAnnotations;
- namespace zadanie5v21.Models
- {
- public partial class User
- {
- [Display(Name = "ID")]
- public int userID { get; set; }
- [Required]
- [RegularExpression(@"[A-Za-zżźćńółęąśŻŹĆĄŚĘŁÓŃ]*", ErrorMessage ="Bez cyfr")]
- [StringLength(10, MinimumLength = 5)]
- [Display(Name = "Imię")]
- public string firstName { get; set; }
- [Required]
- [RegularExpression(@"[A-Za-zżźćńółęąśŻŹĆĄŚĘŁÓŃ]*", ErrorMessage = "Bez cyfr")]
- [StringLength(20, MinimumLength = 4, ErrorMessage = "Minimim 4 litery, max 20")]
- [Display(Name = "Nazwisko")]
- public string lastName { get; set; }
- [Required]
- [Range(0, 120)]
- [Display(Name = "Wiek")]
- public int age { get; set; }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement