![]() |
|
Thread Tools |
#1
|
||||
|
||||
![]()
Does anybody knows how to force users to insert at least X characters into a given custom profile filed?
In the user's custom profile field 'Location' (city), I would like to force users to, at least, insert 3 (three) characters. I've already searched through hacks here in vb.org, but found none... How to do it? Thank you! ![]() No members have liked this post.
|
#2
|
||||
|
||||
You can create a plugin using hook location register_addmember_process and code like this:
Then you also need to create a phrase with the error message you want (set Phrase Type to "Error Message"), and replace 'phrasename' with the name of your phrase. No members have liked this post.
Last edited by kh99; 04 Dec 2012 at 13:38. Reason: fixed a couple typos in code |
#3
|
||||
|
||||
Can't you use the regex field and enter something like:
.{3,}
__________________
Former vBulletin.org Staff Member
Try a search before posting for help. Many users won't, and don't, help if the question has been answered several times before. W3Schools - Online vBulletin Manual If I post some CSS and don't say where it goes, put it in the additional.css template. I will NOT help via PM (you will be directed to post in the forums for help.) No members have liked this post.
|
#4
|
|||
|
|||
You can - I don't think I ever noticed that before. And it works, the only thing is that it only tells you that the value is "missing or invalid". But if you also edit the description to say that it has to be 3 or more chars, that works pretty well, with no plugins.
The following members like this post: Lynne
|
![]() |
«
Previous Thread
|
Next Thread
»
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
|
|
New To Site? | Need Help? |
All times are GMT. The time now is 10:49.