Skip to content

Instantly share code, notes, and snippets.

@Ale1
Ale1 / form-validator.js
Last active December 22, 2015 09:39 — forked from ksolo/form-validator.js
Form Validation
$(function(){
// VALIDATION TESTS:
function test_email(input_email){ return input_email.match(/.+@.+\..{2,3}/)};
function test_pass_num(input_password){return input_password.match(/\d/)};
function test_pass_caps(input_password){return input_password.match(/[A-Z]+/)};
/* Here is your chance to take over Socrates!
Spend 10 minutes on each of the following hacks to the Socrates website.
Enter them in the console to make sure it works and then save
your results here.
Choose a new pair for each. Add your names to the section you complete.
*/