HuangruiChu / Haxel-Eventbrite

project-starter-withered-horizon created by GitHub Classroom
4 stars 1 forks source link

[Event] New Event Bad Location and Tell Customer why their location is Bad #16

Closed HuangruiChu closed 1 year ago

HuangruiChu commented 1 year ago

❌ - it does not allow creating an event with bad location Location must be more than 5 and fewer than 50 unicode characters. If the location is invalid, you should return the user to the form (at the same URL) and show them their error. I'm checking for elements with one of the following classes- error, errors, form-error, form-errors. The invalid location I submitted was "Os omocec mozho fupan rinokte ma akilo obazorgi ce kectu funlojav ekokuz mu ja tat oriejmu vugus ledaufu ugwikge te lehuvo sesigi bo ihouf laolvun etjener pelafve tavopvi pasfap ebofak tah ibe.".

HuangruiChu commented 1 year ago

Fixed by telling the user that:

Location must be between 5 and 50 unicode characters!

HuangruiChu commented 1 year ago

the commit 5735dfd solve this issue

hanslanda458 commented 1 year ago

As a user, I should be enter location in the valid format and get told if my location is not in the valid format

Acceptance Criteria:

  1. When a user attempts to create an event, the location input field on the event creation form must only accept location values that are between 5 and 50 Unicode characters in length.
  2. If a user submits an event creation form with a location that is less than 5 characters or more than 50 characters, the system should detect this as an error.
  3. If a location error is detected, the user should be redirected back to the same URL where the event creation form is displayed.
  4. The location input field should retain the user's previously entered data. (preferred)
  5. The system should display a clear error message on the event creation form, indicating that the location provided is invalid due to its length.
  6. The error message should be prominently displayed and easily noticeable, and it should be associated with the location input field.
  7. The error message should be styled in a way that distinguishes it as an error, such as using a red color or an icon commonly associated with errors.
  8. The error message should use user-friendly language to inform the user of the issue, for example: "Location must be between 5 and 50 characters."
  9. The error message should not only appear visually but should also be available to screen readers for accessibility.
  10. The error message should be part of the HTML with one of the following classes: "error," "errors," "form-error," or "form-errors" to ensure that it can be targeted and styled with CSS.
  11. The user should be able to correct the location error and resubmit the event creation form without encountering any issues related to the previous error.