Skip to content

Commit

Permalink
Merge pull request #1448 from rocklobster-in/dev/5.9
Browse files Browse the repository at this point in the history
Increase default maxlength
  • Loading branch information
takayukister authored Jul 4, 2024
2 parents 1f423da + 7e1a14d commit 2bd1d78
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions modules/text.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ function wpcf7_text_form_tag_handler( $tag ) {
$atts = array();

$atts['size'] = $tag->get_size_option( '40' );
$atts['maxlength'] = $tag->get_maxlength_option( '80' );
$atts['maxlength'] = $tag->get_maxlength_option( '400' );
$atts['minlength'] = $tag->get_minlength_option();

if ( $atts['maxlength'] and $atts['minlength']
Expand Down Expand Up @@ -156,7 +156,7 @@ function wpcf7_swv_add_text_rules( $schema, $contact_form ) {
);
}

if ( $maxlength = $tag->get_maxlength_option( '80' ) ) {
if ( $maxlength = $tag->get_maxlength_option( '400' ) ) {
$schema->add_rule(
wpcf7_swv_create_rule( 'maxlength', array(
'field' => $tag->name,
Expand Down
4 changes: 2 additions & 2 deletions modules/textarea.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ function wpcf7_textarea_form_tag_handler( $tag ) {

$atts['cols'] = $tag->get_cols_option( '40' );
$atts['rows'] = $tag->get_rows_option( '10' );
$atts['maxlength'] = $tag->get_maxlength_option( '400' );
$atts['maxlength'] = $tag->get_maxlength_option( '2000' );
$atts['minlength'] = $tag->get_minlength_option();

if ( $atts['maxlength'] and $atts['minlength']
Expand Down Expand Up @@ -119,7 +119,7 @@ function wpcf7_swv_add_textarea_rules( $schema, $contact_form ) {
);
}

if ( $maxlength = $tag->get_maxlength_option( '400' ) ) {
if ( $maxlength = $tag->get_maxlength_option( '2000' ) ) {
$schema->add_rule(
wpcf7_swv_create_rule( 'maxlength', array(
'field' => $tag->name,
Expand Down

0 comments on commit 2bd1d78

Please sign in to comment.