diff --git a/app/static/js/passwords-match.js b/app/static/js/passwords-match.js new file mode 100644 index 0000000..26c41fd --- /dev/null +++ b/app/static/js/passwords-match.js @@ -0,0 +1,8 @@ +(() => { + 'use strict' + const password = document.getElementById("password"); + const password_validation = document.getElementById("password-confirmation"); + password.addEventListener('change', (c) => { + password_validation.setAttribute("pattern", c.target.value); + }); +})() \ No newline at end of file diff --git a/app/templates/users/register.html b/app/templates/users/register.html index eb9695f..6399e47 100644 --- a/app/templates/users/register.html +++ b/app/templates/users/register.html @@ -97,14 +97,5 @@ - + {% endblock %} \ No newline at end of file