<commit_before>﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Web;

namespace CarsSystem.WebClient.MVC.Areas.Administration.Models
{
    public class UserViewModel
    {
        [Required]
        public string Username { get; set; }

        [Required]
        [StringLength(20, ErrorMessage = "{0} should be between {2} and {1} symbols long!", MinimumLength = 2)]
        [Display(Name = "First name")]
        public string FirstName { get; set; }

        [Required]
        [StringLength(20, ErrorMessage = "{0} should be between {2} and {1} symbols long!", MinimumLength = 2)]
        [Display(Name = "Second name")]
        public string SecondName { get; set; }

        [Required]
        [StringLength(20, ErrorMessage = "{0} should be between {2} and {1} symbols long!", MinimumLength = 2)]
        [Display(Name = "Last name")]
        public string LastName { get; set; }

        [Required]
        [Index(IsUnique = true)]
        public long Egn { get; set; }

        [Required]
        [Index(IsUnique = true)]
        public int NumberOfIdCard { get; set; }

        [Required]
        [DataType(DataType.DateTime)]
        public DateTime DateOfIssue { get; set; }

        [Required]
        [StringLength(20, ErrorMessage = "{0} should be between {2} and {1} symbols long!", MinimumLength = 0)]
        public string City { get; set; }

        [Required]
        public string PhoneNumber { get; set; }

        [Required]
        public string Email { get; set; }
    }
}<commit_msg>Added Email field validation on UserViewModel.<commit_after>﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Web;

namespace CarsSystem.WebClient.MVC.Areas.Administration.Models
{
    public class UserViewModel
    {
        [Required]
        public string Username { get; set; }

        [Required]
        [StringLength(20, ErrorMessage = "{0} should be between {2} and {1} symbols long!", MinimumLength = 2)]
        [Display(Name = "First name")]
        public string FirstName { get; set; }

        [Required]
        [StringLength(20, ErrorMessage = "{0} should be between {2} and {1} symbols long!", MinimumLength = 2)]
        [Display(Name = "Second name")]
        public string SecondName { get; set; }

        [Required]
        [StringLength(20, ErrorMessage = "{0} should be between {2} and {1} symbols long!", MinimumLength = 2)]
        [Display(Name = "Last name")]
        public string LastName { get; set; }

        [Required]
        [Index(IsUnique = true)]
        public long Egn { get; set; }

        [Required]
        [Index(IsUnique = true)]
        public int NumberOfIdCard { get; set; }

        [Required]
        [DataType(DataType.DateTime)]
        public DateTime DateOfIssue { get; set; }

        [Required]
        [StringLength(20, ErrorMessage = "{0} should be between {2} and {1} symbols long!", MinimumLength = 0)]
        public string City { get; set; }

        [Required]
        public string PhoneNumber { get; set; }

        [Required]
        [EmailAddress]
        public string Email { get; set; }
    }
}
{'fraction_non_alphanumeric': 0.11614645858343338, 'fraction_numerical': 0.014405762304921969, 'mean_word_length': 2.591594827586207, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4267281', 'n_tokens_mistral': 970, 'n_tokens_neox': 929, 'n_words': 292}