Limit characters for nicknames
Page 1 of 1
Limit characters for nicknames
Is there a way to limit characters only to a-z and numbers and few other marks like . [ ] | ?
dudi- Forumember
- Posts : 104
Reputation : 30
Language : English
Re: Limit characters for nicknames
Add this code in your JavaScript management:
Find:
- Code:
var regx_chr = /^([A-Za-z\[\]\?\|\.]+)$/;
function checkForm() {
var inpbox = document.getElementsByClassName('post').value;
if(inpbox.search(regx_chr) == -1) {
alert('Adaugti cel putin un caracter.\n Doar litere, [, ], |, ?, .');
return false;
}
}
document.getElementById('register').onsubmit = checkForm;
Find:
- Code:
<!-- BEGIN switch_namechange_allowed -->
<tr>
<td class="row1" width="38%"><span class="gen">{L_USERNAME} : *</span></td>
<td class="row2"><input class="post" type="text" name="username" value="Using php in posts is called being a smart [Language]... Stop it" size="25" maxlength="25" /></td>
</tr>
<!-- END switch_namechange_allowed -->
Guest- Guest
Similar topics
» Name Characters Limit
» Minimum characters limit.
» How do you limit the characters in posts?
» Username characters limit?
» Remove the limit of 1000 characters in signatures
» Minimum characters limit.
» How do you limit the characters in posts?
» Username characters limit?
» Remove the limit of 1000 characters in signatures
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum