diff options
Diffstat (limited to 'templates/base.html')
-rw-r--r-- | templates/base.html | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/templates/base.html b/templates/base.html index bb59dda..64024e4 100644 --- a/templates/base.html +++ b/templates/base.html @@ -40,6 +40,20 @@ $(input).addClass("ui-state-default"); } }); + + function validUser(value,element) { + var valid = false; + $.ajax({ + url: "/user/info/"+value+".json", + async: false, + dataType: 'json', + success: function (json) { + valid = true; + } + }); + return valid; + } + $.validator.addMethod("validUser", validUser, "Please enter a valid user."); }); </script> {% block js %}{% endblock %} |