*

kriskoyk

  • *****
  • 324 posts
Minimum number of password characters
« on: November 22, 2024, 08:27:19 PM »
How can I set a minimum number of characters when entering an ad password?

*

MB Themes

Re: Minimum number of password characters
« Reply #1 on: November 24, 2024, 08:04:54 AM »
No, but can be easily changed by adding minlength property to input
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

kriskoyk

  • *****
  • 324 posts
Re: Minimum number of password characters
« Reply #2 on: November 24, 2024, 11:22:00 AM »
I added to form_passwrd.php, minlength="6" and required so that users are required to enter a password of at least 6 characters.
Here is the whole file:
Code: [Select]
<?php 
  $item_my 
ModelBO::newInstance()->getItem($item_id); 
?>


<link href="<?php echo osc_base_url(); ?>oc-content/plugins/backoffice_manager/css/form.css" rel="stylesheet" type="text/css" />

<div class="row">
  <div id="bo_mgr_table">
    <label for="bo_mgr_passwrd"><?php _e('Enter Password''backoffice_manager'); ?></label>
    <input type="text" style="float:left;" name="bo_mgr_passwrd" id="bo_mgr_passwrd" value="<?php if($item_my['passwrd'] <> ''){echo $item_my['passwrd']; } else { echo Params::getParam('passwrd'); } ?>" size="20" minlength="6" maxlength="20" required />
    <div class="bo_info"><?php _e('Used to edit this listing''backoffice_manager');?></div>
  </div>
</div>


The following problem occurs: When I have the booking plugin activated, the message for correct password completion appears at the top, while when I disable booking, the message appears below the password box, which is probably the correct one.
« Last Edit: November 24, 2024, 11:25:40 AM by kriskoyk »

*

MB Themes

Re: Minimum number of password characters
« Reply #3 on: November 25, 2024, 03:34:01 PM »
You mean error message? I think it should be on top.
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

kriskoyk

  • *****
  • 324 posts
Re: Minimum number of password characters
« Reply #4 on: November 25, 2024, 05:14:42 PM »
However, when the booking plugin is enabled, the message appears below the password box, as shown in the photo. How can I make it appear below the password box with the booking plugin disabled? This way it is easier for users to see.

And why does the booking plugin affect the display position of the message?
« Last Edit: November 25, 2024, 05:18:55 PM by kriskoyk »

*

MB Themes

Re: Minimum number of password characters
« Reply #5 on: November 26, 2024, 09:29:09 PM »
That's interesting, but it's backoffice, not important. You probably has some jquery conflict?
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

kriskoyk

  • *****
  • 324 posts
Re: Minimum number of password characters
« Reply #6 on: November 27, 2024, 09:37:45 AM »
How is this detected and how is it corrected?

*

MB Themes

Re: Minimum number of password characters
« Reply #7 on: November 29, 2024, 03:36:16 PM »
In backoffice, check browser console.
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

kriskoyk

  • *****
  • 324 posts
Re: Minimum number of password characters
« Reply #8 on: December 02, 2024, 12:47:10 AM »
Because as I told you, by displaying the message below the password box, it is easier for users to see it, how can I do that?

*

MB Themes

Re: Minimum number of password characters
« Reply #9 on: December 04, 2024, 11:29:20 AM »
Booking plugin was updated.
It relates to jquery validate script, there are options to show just one error box or to show it below inputs. You will need to check it's documentation and reference.
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

kriskoyk

  • *****
  • 324 posts
Re: Minimum number of password characters
« Reply #10 on: December 04, 2024, 01:56:21 PM »
Do you mean the documentation and the reference for the Backoffice Manager Plugin? I have deleted the booking plugin because I don't need it.

*

MB Themes

Re: Minimum number of password characters
« Reply #11 on: December 05, 2024, 03:40:12 PM »
Documentation of jquery validate:
https://jqueryvalidation.org/
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

kriskoyk

  • *****
  • 324 posts
Re: Minimum number of password characters
« Reply #12 on: December 05, 2024, 11:11:50 PM »
Thanks for the suggestion, but this is difficult for me to do on my own.

*

kriskoyk

  • *****
  • 324 posts
Re: Minimum number of password characters
« Reply #13 on: December 06, 2024, 03:51:22 PM »
The way this demo https://jqueryvalidation.org/files/demo/ works is very useful for users and I believe that in the future it should be introduced into user logins and every form that requires data.