TextBoxOptions.cs 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. namespace Bowin.Web.Controls.Mvc
  6. {
  7. public class TextBoxOptions : BaseFormControlOptions
  8. {
  9. public TextBoxOptions()
  10. {
  11. this.IsRequired = false;
  12. }
  13. public IDictionary<string, object> HtmlAttributes { get; set; }
  14. /// <summary>
  15. /// 输入框类型
  16. /// </summary>
  17. public TextBoxType TextBoxType { get; set; }
  18. //*************你妹的,写完才跟我说用Model验证****************//
  19. ///// <summary>
  20. ///// 非空约束?默认:否
  21. ///// </summary>
  22. //public bool IsRequired { get; set; }
  23. ///// <summary>
  24. ///// 验证输入数据的规则:
  25. ///// <para>email</para>
  26. ///// <para>url</para>
  27. ///// <para>最小长度为10,最大长度为100 length[10,100]</para>
  28. ///// <para>最小长度为10,不限制最大长度 length[10,0]</para>
  29. ///// <para>不限制最小长度,最大长度为10 length[0,10]</para>
  30. ///// <para>--------------------------------------------------</para>
  31. ///// <para>自定义验证函数 囧 暂不支持,没空写这个功能...</para>
  32. ///// </summary>
  33. //public string RequiredRule { get; set; }
  34. //**************************End*******************************//
  35. /// <summary>
  36. /// 输入框默认值
  37. /// </summary>
  38. public object Value { get; set; }
  39. public string OnSelect { get; set; }
  40. public string OnChange { get; set; }
  41. public string OnClear { get; set; }
  42. }
  43. }