johnhamelink
1/3/2013 - 11:01 PM

scripts.js

    var happy = {
        email: function (val) {
            return /(?:\w+\.?)*[\-|\w|\+]+@(?:[\w|\-|\+]+\.)+\w+$/.test(val);
        },

        minLength: function (val, length) {
            return val.length >= length;
        },

        maxLength: function (val, length) {
            return val.length <= length;
        },

        equal: function (val1, val2) {
            return (val1 == val2);
        }
    };