-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Siren imposes limits on what a Siren field's `type` can be, but this was not being enforced by this library. As a first step, add SirenFieldType, which includes all the valid field types. This is a non-breaking change, which will be followed up by updating usages of this library to use SirenFieldType instead of a string, followed by a breaking change here to update the constructor to only allow for SirenFieldType.
- Loading branch information
Showing
4 changed files
with
30 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
namespace D2L.Hypermedia.Siren { | ||
|
||
public class SirenFieldType { | ||
|
||
public static string Hidden => "hidden"; | ||
public static string Text => "text"; | ||
public static string Search => "search"; | ||
public static string Tel => "tel"; | ||
public static string Url => "url"; | ||
public static string Email => "email"; | ||
public static string Password => "password"; | ||
public static string Datetime => "datetime"; | ||
public static string Date => "date"; | ||
public static string Month => "month"; | ||
public static string Week => "week"; | ||
public static string Time => "time"; | ||
public static string DatetimeLocal => "datetime-local"; | ||
public static string Number => "number"; | ||
public static string Range => "range"; | ||
public static string Color => "color"; | ||
public static string Checkbox => "checkbox"; | ||
public static string Radio => "radio"; | ||
public static string File => "file"; | ||
|
||
} | ||
|
||
} |