Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
public class DemoFormModel
{
[JsonSchemaExtensionData("label", "Label")]
[JsonSchemaExtensionData("required", true)]
[Description("The description appears below the input.")]
[MinLength(3)]
[MaxLength(50)]
public string TextProperty { get; set; }
public string StringProperty { get; set; }
public bool BooleanProperty { get; set; }
public int IntegerProperty { get; set; }
[JsonSchemaExtensionData("xtype", "date")]
public DateTime DateProperty { get; set; }
[JsonSchemaExtensionData("xtype", "time")]
public DateTime TimeProperty { get; set; }
[JsonSchemaExtensionData("readonly", true)]
public int ReadOnlyProperty { get; set; }
[JsonSchemaExtensionData("xtype", "range")]
[JsonSchemaExtensionData("min", 0)]
[JsonSchemaExtensionData("max", 10)]
[JsonSchemaExtensionData("step", 0.5)]
public decimal RangeProperty { get; set; }
[JsonSchemaExtensionData("optionsFromProperty", "stringOptions")]
public string SelectedOption { get; set; }
public List<string> StringOptions { get; set; }
[JsonSchemaExtensionData("optionsFromProperty", "stringOptions")]
[JsonSchemaExtensionData("nullOption", "None")]
public string NullOptionProperty { get; set; }
[JsonSchemaExtensionData("xtype", "textarea")]
public string TextAreaProperty { get; set; }
[JsonSchemaExtensionData("xtype", "textarea")]
[JsonSchemaExtensionData("rows", "6")]
[JsonSchemaExtensionData("maxrows", "50")]
public string BigTextAreaProperty { get; set; }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.