gcivil-nyu-org / wed-fall24-team3

2 stars 0 forks source link

[Bug] - Buying a ticket doesn't have form validation for phone number. #129

Closed rsc1102 closed 1 week ago

rsc1102 commented 1 week ago

Description Problem with buying a ticket when the phone number specified isn't in a valid format.

Steps to Reproduce

  1. Log in
  2. Click on "Browse Events".
  3. Click on any event.
  4. Click on "Buy Tickets".
  5. Enter some random string in the phone number input field.
  6. Click on "Buy Tickets".

Expected Behavior Form validation should be performed to warn the user that the number is in the incorrect format.

Screenshots or Code Snippets (required) image

The HTML code for the input field is:

<input type="text" name="phone_number" value="randomstring" maxlength="12" required="" aria-invalid="true" id="id_phone_number">

It should have a pattern parameter.

Additional If the user is unable to buy a ticket due to such an issue, the app should warn the user that the transaction was not successful.

simarmehta commented 1 week ago

Yes @rsc1102 the application allows you to enter but the purchase/registration does not go through, so the only thing is the user should be prompted about the error which is missing on the page, a warning about incorrect format.