<commit_before>﻿using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.Web.Mvc;
using CustomValidation.Validation.CustomAttribute;
using CustomValidation.Validation.CustomType;

namespace CustomValidation.Controllers
{
    public class HomeController : Controller
    {
        //
        // GET: /Home/
		[HttpGet]
        public ActionResult Index()
        {
            return View();
        }

		[HttpPost]
		public ActionResult Index(MyModel model)
		{
			if (ModelState.IsValid)
			{
				return View();
			}
			return View(model);
		}

    }

	public class MyModel
	{

		[Digits]
		public string DigitsWithCustomAttribute { get; set; }
		
		[DataType("Digits")]
		public string DigitsWithDataTypeAttribute { get; set; }

		// todo: Fix client-side validation
		public Digits DigitsAsCustomType { get; set; }

		// Test the other DataTypes still work:
		
		[DataType(DataType.EmailAddress)]
		public string Email { get; set; }

		// Test DisplayName works:

		[Digits]
		[DisplayName("Digits 1")]
		public string CustomAttributeWithLabel { get; set; }

		[DataType("Digits")]
		[DisplayName("Digits 2")]
		public string DataTypeAttributeWithLabel { get; set; }

		[DisplayName("Digits 3")]
		public Digits CustomTypeWithLabel { get; set; }

		// Test nesting:
		public MyNestedModel MyNestedModel { get; set; }

	}

	public class MyNestedModel
	{
		[Digits]
		public string NestedCustomAttribute { get; set; }

		[DataType("Digits")]
		public string NestedDataTypeAttribute { get; set; }

		public Digits NestedCustomType { get; set; }
	}
}
<commit_msg>Fixing whitespace<commit_after>﻿using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.Web.Mvc;
using CustomValidation.Validation.CustomAttribute;
using CustomValidation.Validation.CustomType;

namespace CustomValidation.Controllers
{
	public class HomeController : Controller
	{
		//
		// GET: /Home/
		[HttpGet]
		public ActionResult Index()
		{
			return View();
		}

		[HttpPost]
		public ActionResult Index(MyModel model)
		{
			if (ModelState.IsValid)
			{
				return View();
			}
			return View(model);
		}

	}

	public class MyModel
	{

		[Digits]
		public string DigitsWithCustomAttribute { get; set; }
		
		[DataType("Digits")]
		public string DigitsWithDataTypeAttribute { get; set; }

		// todo: Fix client-side validation
		public Digits DigitsAsCustomType { get; set; }

		// Test the other DataTypes still work:
		
		[DataType(DataType.EmailAddress)]
		public string Email { get; set; }

		// Test DisplayName works:

		[Digits]
		[DisplayName("Digits 1")]
		public string CustomAttributeWithLabel { get; set; }

		[DataType("Digits")]
		[DisplayName("Digits 2")]
		public string DataTypeAttributeWithLabel { get; set; }

		[DisplayName("Digits 3")]
		public Digits CustomTypeWithLabel { get; set; }

		// Test nesting:

		public MyNestedModel MyNestedModel { get; set; }

	}

	public class MyNestedModel
	{
		[Digits]
		public string NestedCustomAttribute { get; set; }

		[DataType("Digits")]
		public string NestedDataTypeAttribute { get; set; }

		public Digits NestedCustomType { get; set; }
	}
}

{'fraction_non_alphanumeric': 0.10018214936247723, 'fraction_numerical': 0.0018214936247723133, 'mean_word_length': 2.9603365384615383, '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': '4731019', 'n_tokens_mistral': 1146, 'n_tokens_neox': 980, 'n_words': 249}