Fix validation in courseList
authorBenjamin Auder <benjamin.auder@somewhere>
Sat, 27 Jan 2018 18:36:26 +0000 (19:36 +0100)
committerBenjamin Auder <benjamin.auder@somewhere>
Sat, 27 Jan 2018 18:36:26 +0000 (19:36 +0100)
public/javascripts/courseList.js

index ae1f1d8..238c1fc 100644 (file)
@@ -20,7 +20,7 @@ window.onload = function() {
                                if (!admin)
                                        return;
                                // modal, fill code and description
-                               let error = Validator.checkCode(this.newCourse.code);
+                               let error = Validator.checkObject({code:this.newCourse.code}, "Course");
                                if (!!error)
                                        return alert(error);
                                else