Let’s practice adding more fields onto our event objects and
validating them. Create a new branch from your own display-errors
branch. Here’s the display-errors
branch on
coding-events-demo if you need to get up to speed.
Below, we describe some new fields for you to add to the Event
class.
For each field, consider the following factors:
Event information to add:
Add a field to collect information about where the event will take place. This field should not be null or blank.
Add a field to collect information about whether an attendee must register for the event or not. For the purposes of validation practice, make this field only able to be marked as true.
Add a field to collect information about the number of attendees for the event. Valid values for this field should be any number over zero.
Browse the validation annotations to find one to use on another new field of your choosing.