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

fixed validation on program description #300

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

Jadowacu1
Copy link
Contributor

@Jadowacu1 Jadowacu1 commented Dec 6, 2024

Title: Improve Validation for the Program Creation

Description:

This PR updates the validation schema for input field in the program schema. Previously, input field used a restrictive regex pattern (/^[\p{L}\p{N}\p{P}\p{Z}]+$/u), which caused validation issues for certain inputs, such as those containing special characters, newlines, or unrecognized Unicode characters.

The changes in this PR relax the validation for input field by:

Allowing any string, including special characters and newlines, using the regex /^[\s\S]*$/.
Ensuring that input field remains required.

Changes Made:

Modified the input field validation in programSchema.
Updated the regex to support a broader range of input characters.

Impact of Changes:

Input field will now accept inputs with special characters, newlines, and other valid text formats.

How this have been tested

  • open the app vis preview link
  • login as superAdmin by username: [email protected] password: password123
  • navigate to program
  • Create program by using any text description

Copy link

vercel bot commented Dec 6, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
atlp-devpulse-fn ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 8, 2024 8:16am

@Jadowacu1 Jadowacu1 force-pushed the fix-program-creation-validation branch from a1b176a to baabec4 Compare December 8, 2024 08:12
Copy link

codeclimate bot commented Dec 8, 2024

Code Climate has analyzed commit baabec4 and detected 0 issues on this pull request.

View more on Code Climate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
DREAM DREAM TEAM Ready For Review Extra attention is needed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant