Get started with mailcheck CDN
MIT licensed
Mailcheck is a lightweight library that validates email addresses in real-time.
Tags:- form
- spell check
Stable version
Copied!
How to start using mailcheck CDN
<!DOCTYPE html>
<html>
<head>
<title>Get started with mailcheck CDN - cdnhub.io</title>
<script src="https://cdn.jsdelivr.net/npm/mailcheck@1.1.2/dist/mailcheck.min.js"></script>
</head>
<body>
<input type="email" id="emailInput" placeholder="Enter your email address" required>
<button id="checkButton" onclick="checkEmail()">Check Email</button>
<p id="result"></p>
<script>
function checkEmail() {
const emailInput = document.getElementById('emailInput');
const result = document.getElementById('result');
Mailcheck.check(emailInput.value)
.then(result => {
if (result.isValid) {
result.message = 'Valid email address';
}
document.getElementById('result').textContent = result.message;
})
.catch(error => console.error(error));
}
</script>
</body>
</html>
Copied!
Copied!