MyBB Community Forums

Full Version: how to display message about complex password
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
hi all,

I have a VERY stripped down registration page.  there seems to be a problem with displaying a message about requiring a complex password, something about the javascript validation not taking complex passwords into account.  leefish had mentioned this bit:

$('#password').rules('add', {
required: true,
minlength: 8,
remote:{
url: 'xmlhttp.php?action=complex_password',
type: 'post',
dataType: 'json',
data:
{
my_post_key: my_post_key
},
},
messages: {
minlength: 'Your password must be 8 or more characters long',
required: 'Your password must be 8 or more characters long',
remote: 'You need to enter the text in the image above'
}
});

$('#password2').rules('add', {
required: true,
minlength: 8,
equalTo: '#password',
messages: {
minlength: 'Your password must be 8 or more characters long',
required: 'Your password must be 8 or more characters long',
equalTo: 'The passwords you enter must match'
}
});

here's how my page looks:

[Image: o0rXkXw.jpg]

any ideas?
aren't you referring to SN forum ? its desktop registration form is already showing required information
The referred forum is here : http://damnfineshave.com/index.php

Shavenook registration is hardcoded as a workaround (ie the text re passwords is always visible) .
I feel the form is working as expected ! (image) - or I am mistaken about the actual requirement ..
just hit submit registration with nothing filled in Smile You will see it does not show the complex info.

Clarify:
create a user called Myuser
add a pass "mypass"
add an email

result: message says password must be 8 letters or more

Change pass to mybigpass

result : message says requires complex.

Wanted behaviour: if a complex pass is required then it should say so on first try.
yeah, ideally I'd want it to display a popup or something while the user is inside the password field that it requires mybb's form of a complex password, or else having a stripped down registration page is kind of pointless.
Fixed

I edited the language string in languages/member.lang.php