Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Validation for a NumberField within the manager #2029

Open
PickleMeSilvers opened this issue Nov 21, 2023 · 0 comments
Open

Validation for a NumberField within the manager #2029

PickleMeSilvers opened this issue Nov 21, 2023 · 0 comments

Comments

@PickleMeSilvers
Copy link

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; }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant