Skip to content
This repository has been archived by the owner on Jun 9, 2023. It is now read-only.

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

Merged

Conversation

Ravichandra-C
Copy link
Contributor

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

  • 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
Copy link

gitpod-io bot commented Sep 17, 2021

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
Copy link
Contributor

@ojeytonwilliams ojeytonwilliams left a comment

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.

server/src/app.ts Outdated Show resolved Hide resolved
cypress/integration/dashboard/events.js Outdated Show resolved Hide 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
Copy link
Contributor

@ojeytonwilliams ojeytonwilliams left a comment

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
Contributor

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

@ojeytonwilliams
Copy link
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