question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Validate URL Fields like events.event_url and events.video_url

See original GitHub issue

Per #423 and #424, we agreed to add validation to check the user provided input is a valid URL.

It was suggested by @timmyichen new URL() wasn’t the best solution and we agreed to merge in the database fields, but create a new issue.

These examples of url fields are described in #378 and were added via issues #380 and #381

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:10 (10 by maintainers)

github_iconTop GitHub Comments

3reactions
Ravichandra-Ccommented, Sep 16, 2021

@allella @Zeko369 @ojeytonwilliams, Can I use class-validator module decorators for fields to add the @IsUrl Restriction in the Mutation instead of writing a custom validator? I also saw that type graphql validations are disabled in server/src/app.ts. Could you please let me know if there any reason for that? and Can I enable them?

image

1reaction
Zeko369commented, Sep 16, 2021

YES, enable them in app.ts and use them here.

I’d just do IsUrl above Field to make it more consistent and nicer looking, but that’s just a personal preference

Read more comments on GitHub >

github_iconTop Results From Across the Web

how to provide validation for input URL field , ei... - ServiceNow
Solved: I had added an URL field in form where users will give URL values as input ; and I want to validate...
Read more >
How to validate youtube url in client side in text box
Here is the code which validates the youtube url- function validateYouTubeUrl() { var url = $('#youTubeUrl').val(); if (url != undefined ...
Read more >
<input type="url"> - HTML: HyperText Markup Language | MDN
The input value is automatically validated to ensure that it's either empty or a properly-formatted URL before the form can be submitted.
Read more >
Featured Content | Attendease Help Center
Add text that highlights the most important information about your event and ... In the "Video URL" field you are able to set...
Read more >
cordova-plugin-inappbrowser
The InAppBrowser window behaves like a standard web browser, and can't access Cordova APIs. ... The loadstop event fires when loading is complete....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found