Skip to:
Content
Pages
Categories
Search
Top
Bottom

Add a character limit to fields in registration form

  • @raphadko

    Participant

    Hey guys,
    I noticed that the fields on my buddypress website registration form, in any field, the user is allowed to enter unlimited characters. How can I restrict that?
    I have searched for it everywhere, and the best solution I found was to use javascript, but we all know this is not really a restriction, as experienced users can disable it.
    Any ideas?

Viewing 8 replies - 1 through 8 (of 8 total)
  • @raphadko

    Participant

    anyone? I believe this is an important flaw..

    @benzine

    Participant

    I’m also eager to know that.

    BUMP

    @raphadko

    Participant

    I found out people limit the output of the data.
    Not a very good solution.. An unlimited field is a potential security risk to a website.

    @raphadko

    Participant

    bump

    @raphadko

    Participant

    bump, can anyone help?

    @benzine

    Participant

    man, seems like no one is interested!!!

    @raphadko

    Participant

    bump, again

    @ananwebman

    Participant

    hi @raphadko

    you can use :

    if( strlen( $user_name ) >= 13 )
    		$errors->add( 'user_name',  __( 'Username must be 12 characters maximum', 'buddypress' ) );	

    in /plugins/buddypress/bp-members/bp-members-functions.php
    inside function bp_core_validate_user_signup ()

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Add a character limit to fields in registration form’ is closed to new replies.
Skip to toolbar