[wp-trac] [WordPress Trac] #60878: We need to add trim validation on Add New Category name

WordPress Trac noreply at wordpress.org
Tue Apr 2 06:03:57 UTC 2024


#60878: We need to add trim validation on Add New Category name
-------------------------------------------------+-------------------------
 Reporter:  sumitsingh                           |      Owner:  (none)
     Type:  defect (bug)                         |     Status:  new
 Priority:  normal                               |  Milestone:  Awaiting
                                                 |  Review
Component:  Posts, Post Types                    |    Version:  trunk
 Severity:  normal                               |   Keywords:  has-
  Focuses:  ui, accessibility, javascript,       |  screenshots
  administration                                 |
-------------------------------------------------+-------------------------
 Hey Team,

 Today I have just by mistake added space then validation is not working.
 So I can suggest using the trim function to remove space things too?

 == Bug Report
 === Description
 Describe the bug.

 === Environment
 - WordPress: 6.5-RC4
 - PHP: 7.4.3-4ubuntu2.20
 - Server: Apache/2.4.41 (Ubuntu)
 - Database: mysqli (Server: 8.0.36-0ubuntu0.20.04.1 / Client: mysqlnd
 7.4.3-4ubuntu2.20)
 - Browser: Chrome 116.0.0.0 (Linux)
 - Theme: Twenty Eleven 4.5
 - MU-Plugins: None activated
 - Plugins:
   * Advanced Custom Fields PRO 6.0.7
   * Elementor 3.17.3
   * Favorites Any Post 1.0.0
   * React Post Listing 1.0.0
   * Simple Custom Post Order 2.5.7
   * WooCommerce 8.3.1
   * WooPayments 6.8.0
   * WordPress Beta Tester 3.5.5

 === Steps to Reproduce
 1. GO to Add New Category
 2. add space on the Category name then click on the "Add New Category"
 button
 x. 🐞 Bug occurs.

 === Expected Results
 1.  ✅ should be an error even if only added space on the field
 === Actual Results
 1.  ❌ an error even added only space on the field

 adding quick recording too.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/60878>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list