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

[proposal] add CDN option in readme #1507

Closed
luiscobot opened this issue Oct 28, 2020 · 11 comments · Fixed by #1844
Closed

[proposal] add CDN option in readme #1507

luiscobot opened this issue Oct 28, 2020 · 11 comments · Fixed by #1844

Comments

@luiscobot
Copy link
Contributor

Hi, I want to proposal to add cdn instructions in the readme, we can use https://unpkg.com/
In that way, we will have a cdn method to add validator.js in client-side.

Can I make a PR?

@tux-tn
Copy link
Member

tux-tn commented Dec 15, 2020

Many people are using unpkg to load JS libraries. I really think it's a great idea to add instructions for that purpose specially that validator.min.js will be removed from the repo
@ezkemboi @profnandaa any feedback on this?

@profnandaa
Copy link
Member

Sounds good to me, let's do that. Thanks!

@Brutalbeard
Copy link

Brutalbeard commented Jan 20, 2021

Busy working on some work, but here's the address if anyone has time to update the readme. If I can, I'll get to it before end of day.

https://unpkg.com/validator.js@latest/dist/validator.min.js

Edit: Of course I say that, but didn't test that min.js worked for me. Derp.

@Brutalbeard
Copy link

In theory, the below should work?

<script type="text/javascript" src="https://unpkg.com/validator.js@latest/dist/validator.min.js"></script>
<script type="text/javascript">
    console.log(validator.isEmail('foo@bar.com')); //=> true
</script>

@ezkemboi
Copy link
Member

Sure @Brutalbeard. Please if you get sometime later in the day, you can add it.
We will appreciate it.

@Brutalbeard
Copy link

Brutalbeard commented Jan 20, 2021

@ezkemboi, @profnandaa, @luiscobits or @tux-tn, can anyone just double check that they have no issue bringing this into a basic HTML page?

I'll have a pull request for the readme ready if you give the go ahead.

@Brutalbeard
Copy link

Hey all. Just bumping on this. Haven't used unpkg.com before. Thinking there may be some other dependency to add?

@ezkemboi, @profnandaa, @luiscobits, @tux-tn

@luiscobot
Copy link
Contributor Author

Thanks @Brutalbeard!

No, Unpkg do not need anything else, only the link that you pointed out before.

@Brutalbeard
Copy link

PR on its way!

@samuelcolburn
Copy link

samuelcolburn commented Jun 21, 2021

Just a head's up:
https://unpkg.com/validator.js@latest/dist/validator.min.js does not point to this package.

I think you probably want:
https://unpkg.com/validator@latest/validator.min.js

@profnandaa
Copy link
Member

@Brutalbeard -- sure, looking forward to your PR.

profnandaa pushed a commit that referenced this issue Oct 30, 2021
theteladras pushed a commit to theteladras/validator.js that referenced this issue Oct 30, 2021
profnandaa pushed a commit that referenced this issue Oct 31, 2021
profnandaa pushed a commit that referenced this issue Oct 31, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants