Fakultas Ilmu Komputer UI

Commit 77351633 authored by alif fadila safriyanto's avatar alif fadila safriyanto
Browse files

[REFACTOR]Fix regex code to be more efficient and fast

parent 2cb50372
Pipeline #26608 failed with stages
in 7 minutes and 56 seconds
......@@ -78,7 +78,7 @@ export default class CompanyRegisterModal extends React.Component {
this.passwordConfirmField = e.target;
}
const validatePassword = /(?=.*\d)(?=.*[a-z])(?=.*[A-Z]).{8,}/g;
const validatePassword = /(?=.*[0-9])(?=.*[a-z])(?=.*[A-Z]).{8,}/g;
if (!validatePassword.test(this.passwordField.value)) {
this.passwordField.setCustomValidity('Must contain at least one number and one uppercase and lowercase letter, and at least 8 or more characters');
......
# -*- coding: utf-8 -*-
# Generated by Django 1.11.17 on 2019-10-06 13:24
from __future__ import unicode_literals
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('core', '0017_vacancy_amount'),
('core', '0019_merge_20191006_0852'),
('core', '0014_auto_20191004_1340'),
]
operations = [
]
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