forked from ServiceStack/ServiceStack
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTextInputAttribute.cs
More file actions
33 lines (30 loc) · 1.01 KB
/
TextInputAttribute.cs
File metadata and controls
33 lines (30 loc) · 1.01 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
using System;
namespace ServiceStack;
[AttributeUsage(AttributeTargets.Property, AllowMultiple = true, Inherited = false)]
public class TextInputAttribute : AttributeBase
{
public string Id { get; set; }
public string Name { get; set; }
public string Type { get; set; }
public string Value { get; set; }
public string Placeholder { get; set; }
public string Help { get; set; }
public string Label { get; set; }
public string Size { get; set; }
public string Pattern { get; set; }
public bool? ReadOnly { get; set; }
public bool? IsRequired { get; set; }
public string Min { get; set; }
public string Max { get; set; }
public int? Step { get; set; }
public int? MinLength { get; set; }
public int? MaxLength { get; set; }
public string[] AllowableValues { get; set; }
public TextInputAttribute() { }
public TextInputAttribute(string id) => Id = id;
public TextInputAttribute(string id, string type)
{
Id = id;
Type = type;
}
}