Custom signup form

I’m creating a custom signup form for my website. Wix has a default password requirement, which is 4-15 characters. How can I override this requirement and require the password to be at least 8 characters? Thanks!

I tried the following code, but it didn’t seem to take any effect.

$w.onReady( function () {
$w( " #Password " ).onCustomValidation( (value, reject) => {
if ((value.length < 8 ) ) { reject( “Password is invalid” );
}
});
});