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

Form validation #20

Open
janusz-chludzinski-zz opened this issue Sep 10, 2020 · 3 comments
Open

Form validation #20

janusz-chludzinski-zz opened this issue Sep 10, 2020 · 3 comments

Comments

@janusz-chludzinski-zz
Copy link
Collaborator

Currently only validation performed when submitting form is check for any input in URI to be shortened. Other possible validations should be included as well, ie. if using tailored cut URI, is URI taken already?

@turbaszek
Copy link
Owner

Good one, currently id the short URI is taken we will fail silently. I don't know how we should do this but some shorteners I know just override existing links.

@janusz-chludzinski-zz
Copy link
Collaborator Author

janusz-chludzinski-zz commented Sep 14, 2020

Good one, currently id the short URI is taken we will fail silently. I don't know how we should do this but some shorteners I know just override existing links.

Overriding does not sound good to me. I think it is to easy to loose your link if you choose some popular word. All of the sudden your shortened link (which might have been populated to many peers) will redirect to wrong address or some xxx content in worst case scenario :) The way I see possible solutions:

  1. Once link is taken, it's taken and can not be reused
  2. We can specify TTL of such URL (possibly allowing users to choose TTL value from predefined values)

WDYT?

@turbaszek
Copy link
Owner

  1. Once link is taken, it's taken and can not be reused

I'm ok with this!

  1. We can specify TTL of such URL (possibly allowing users to choose TTL value from predefined values)

I think it's too much hassle for users - "What ttl I should use? Week or Month?"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants