beckn / beckn-ui-workspace

Mono Repo for Beckn UI Workspace
9 stars 12 forks source link

Policy portal - Validation issues while creating policy #2165

Open omkar-em opened 1 week ago

omkar-em commented 1 week ago

Bug Description

Several validation issues are present while creating a policy:

  1. There should be a minimum and maximum character limit for the title and description fields.
  2. The country and city fields are not synchronized, allowing cities unrelated to the selected country.
  3. The "Source URL" field lacks proper URL validation, allowing invalid URLs to be entered.

Steps to Reproduce

  1. Create a new policy.
  2. Enter a title and description without adhering to any character limit (shorter than expected).
  3. Select a country and attempt to select any city (cities unrelated to the selected country can be chosen).
  4. Enter an invalid URL in the "Source URL" field and observe no validation error.

Expected Behavior

  1. Title field should have a character limit of 10 to 100 characters, and the description field should have a limit of 50 to 2000 characters.
  2. The country and city fields should be synchronized, so that only cities belonging to the selected country are displayed.
  3. The "Source URL" field should validate that the input is a valid URL format.

Actual Behavior

  1. No character limit validation is enforced for the title and description fields.
  2. Country and city fields are not synchronized, allowing any city to be selected regardless of the country chosen.
  3. The "Source URL" field accepts invalid URLs without validation.

Figma

NA

Environment

Screenshots/Logs

NA

aniketceminds commented 1 week ago

Image

omkar-em commented 1 week ago

Working fine. cc- @emmayank @PritiEM