Browse code

Created repository.

DoubleBastionAdmin authored on 26/01/2022 20:32:42
Showing 1 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1 @@
1
+$(document).ready(function(){$("#createconfigbttn").on("click",function(){var b=$("#databasename").val();var a=$("#databaseuser").val();var c=$("#dbuserpassword").val();if((b=="")||(a=="")||(c=="")){alert("All fields must be filled !")}if(b.includes("'")){$("#databasename").val("");alert("The database name shouldn't contain single quotes ('). Change the database name and try again !")}if(a.includes("'")){$("#databaseuser").val("");alert("The database user shouldn't contain single quotes ('). Change the database user and try again !")}if(c.includes("'")){$("#dbuserpassword").val("");alert("The database user password shouldn't contain single quotes ('). Change the database user password and try again !")}});$("#submitadminbttn").on("click",function(){var b=$("#adminuser").val();if(b.includes("'")){$("#adminuser").val("");alert("The administrator's username shouldn't contain single quotes ('). Change the administrator's username and try again !")}var d=$("#adminuserpassword").val();if(d.includes("'")){$("#adminuserpassword").val("");alert("The administrator's password shouldn't contain single quotes ('). Change the administrator's password and try again !")}if(!(/^((?=.*\d)(?=.*[a-z])(?=.*\W).{10,})$/.test(d))){$("#adminuserpassword").val("");alert("The password does not meet the requirements (to be at least 10 characters long, to contain at least one letter, at least one digit and at least one special character). Please choose a different password !")}if((b=="")||(d=="")){alert("All fields must be filled !")}var a=$("#adminuseremail").val();if(a==""){alert("The email address cannot be empty !")}var c=/^([\w-\.]+@([\w-]+\.)+[\w-]{2,4})?$/;if(!(c.test(a))){$("#adminuseremail").val("");alert("Please enter a valid email address")}})});
0 2
\ No newline at end of file