Validation for a NumberField within the manager
PickleMeSilvers opened this issue · comments
Hello,
For context I am writing code for an archery competition site.
I have the following code and I want the admin user to enter a year that the competition is being run in, e.g. 2023. If the user doesn't enter a value & clicks Publish/Save, I want the manager code to capture this and go back to the user and say, "hey, please enter a year". Or I might want to check that the year is not greater, than say, 2100!
Is it possible to interrogate what is being passed back? At the moment I can't see how I can be the "man in the middle". Many thanks.
[BlockType(Name = "Indoor Championship", Category = "Content", Icon = "fas fa-pound-sign", Component = "indoorChampionship-block")]
public class IndoorChampionshipBlock : TextBlock
{
public HtmlField HtmlBody { get; set; }
public NumberField Year { get; set; }
}