Commit d96d0c56 authored by ZeMKI's avatar ZeMKI
Browse files

Update app.js

parent d21eb091
......@@ -54,6 +54,39 @@ Vue.mixin({
return document.URL.split('/').pop();
},
}, methods: {
checkPassword()
{
this.registration.password_length = this.registration.password.length;
const special_chars = /[ !@#$%^&*()_+\-=\[\]{};':"\\|,.<>\/?]/;
if (this.registration.password_length >
5)
{
this.registration.contains_six_characters = true;
}
else
{
this.registration.contains_six_characters = false;
}
this.registration.contains_number = /\d/.test(
this.registration.password);
this.registration.contains_letters = /[a-z]/.test(
this.registration.password);
this.registration.contains_special_character = special_chars.test(
this.registration.password);
if (this.registration.contains_six_characters ===
true &&
this.registration.contains_letters ===
true &&
this.registration.contains_number ===
true)
{
this.registration.valid_password = true;
}
else
{
this.registration.valid_password = false;
}
},
copyObject: function (obj) {
let objCopy = obj.slice();
for (let i = 0;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment