Skip to content
This repository was archived by the owner on Sep 25, 2025. It is now read-only.

Added frontend Input Field Validations on the EventForm.tsx and Enabled validations in app.ts - #707

Merged
ojeytonwilliams merged 8 commits into
freeCodeCamp:mainfrom
Ravichandra-C:validUrlCheck_chapter
Sep 27, 2021
Merged

ojeytonwilliams merged 8 commits into
freeCodeCamp:mainfrom
Ravichandra-C:validUrlCheck_chapter

Conversation

@Ravichandra-C

@Ravichandra-C Ravichandra-C commented Sep 17, 2021 •

Copy link
Copy Markdown
Contributor
  • I have read Chapter's contributing guidelines.
  • My pull request has a descriptive title (not a vague title like Update README.md).
  • My pull request targets the main branch of Chapter.

Closes #430

  1. Added type prop to input component in the Event form page
    2.removed the DefaultValue prop from input component since it is already
    getting set via UseForm react hook
  2. changed the type of URL and Video URL fields to url
  3. Added validation decorators to url and video url fields in server\src\controllers\Events\inputs.ts file.
  4. Enabled class validations in app.ts

1. Added type to input component in the Event form page
2.removed the DefaultValue prop from input component since it is already
  getting set via UseForm react hook
3. changed the type of UrL and Video URL to url
@gitpod-io

gitpod-io Bot commented Sep 17, 2021

Copy link
Copy Markdown

Ravi added 3 commits September 17, 2021 11:59
1. Updated cypress tests to match the role of type=number of Capacity
2. Changed the query for start_at and ends_at
1. Added decorators for URL and Video URL fields
2. Enabled Validations in app.ts
1.Added Get instaed of find to query starts_at and ends_at
2.Added 5 sec wait time for event to save
@Ravichandra-C Ravichandra-C changed the title Added frontend Input Field Validations on the EventForm.tsx Added frontend Input Field Validations on the EventForm.tsx and Enabled validations in app.ts Sep 17, 2021

@ojeytonwilliams ojeytonwilliams left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a ton for this @Ravichandra-C. I found a couple of minor things, but it's looking great.

Comment thread server/src/app.ts Resolved
Comment thread cypress/integration/dashboard/events.js Resolved
1. removed validate:tru from app.ts as it is default value
2. changed the location function from get to findbyLabelText in cypress
   test

@ojeytonwilliams ojeytonwilliams left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍 thanks @Ravichandra-C!

@ojeytonwilliams

Copy link
Copy Markdown
Contributor

@Zeko369 this looks solid to me, but do you want to take a look?

@ojeytonwilliams

Copy link
Copy Markdown
Contributor

Let's move things along. Thanks again for putting this together @Ravichandra-C!

@ojeytonwilliams
ojeytonwilliams merged commit ccae999 into freeCodeCamp:main Sep 27, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Validate URL Fields like events.event_url and events.video_url

2 participants