Minor cleanups

This commit is contained in:
ElPumpo
2018-12-10 21:42:10 +01:00
parent cb89d4edb6
commit 91954ae025
3 changed files with 49 additions and 46 deletions
+4 -2
View File
@@ -11,15 +11,17 @@ $(function() {
}
};
$("#register").submit(function(e) {
e.preventDefault(); // Prevent form from submitting
$("#register").submit(function(event) {
event.preventDefault(); // Prevent form from submitting
// Verify date
var date = $("#dateofbirth").val();
var dateCheck = new Date($("#dateofbirth").val());
if (dateCheck == "Invalid Date") {
date == "invalid";
}
$.post('http://esx_identity/register', JSON.stringify({
firstname: $("#firstname").val(),
lastname: $("#lastname").val(),