Files
zulip/zephyr/static/js/signup.js
Keegan McAllister 5a6247288a Fix typo'd variable
(imported from commit 971e5d28cb14826b020d6e130cd62e600d88a168)
2012-10-03 17:34:53 -04:00

30 lines
857 B
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
/*jslint browser: true, devel: true, sloppy: true,
plusplus: true, nomen: true, regexp: true */
/*global $: false, jQuery: false */
var tld_list = ['gmail.com'];
$.validator.addMethod("fromDomain", function (value, element, param) {
console.log("foo");
console.log(value);
var splitted = value.split("@");
var tld = splitted[splitted.length - 1];
return false;
return $.inArray(tld, tld_list) !== -1;
},
"Please use your company email address to sign up. Otherwise, we wont be able to connect you with your coworkers.");
$(document).ready(function(){
$("#email_signup").validate({
rules: {
email: {
required: true,
email: true,
}
},
errorLabelContainer: "#errors",
errorElement: "div",
errorClass: "alert",
});
});