[xwiki/xwiki-platform] 7368ec: XWIKI-23771: AWM: Numeric field accepts invalid ch...
Branch: refs/heads/master Home: https://github.com/xwiki/xwiki-platform Commit: 7368ec5ac359739c9e358968f07ebf1c7f2b7317 https://github.com/xwiki/xwiki-platform/commit/7368ec5ac359739c9e358968f07eb... Author: LucasC <[email protected]> Date: 2026-08-25 (Tue, 25 Aug 2026) Changed paths: M xwiki-platform-core/xwiki-platform-appwithinminutes/xwiki-platform-appwithinminutes-test/xwiki-platform-appwithinminutes-test-docker/src/test/it/org/xwiki/appwithinminutes/test/ui/AllIT.java A xwiki-platform-core/xwiki-platform-appwithinminutes/xwiki-platform-appwithinminutes-test/xwiki-platform-appwithinminutes-test-docker/src/test/it/org/xwiki/appwithinminutes/test/ui/NumberClassFieldIT.java M xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/objects/classes/NumberClass.java M xwiki-platform-core/xwiki-platform-oldcore/src/main/resources/ApplicationResources.properties M xwiki-platform-core/xwiki-platform-oldcore/src/test/java/com/xpn/xwiki/objects/classes/NumberClassTest.java M xwiki-platform-core/xwiki-platform-test/xwiki-platform-test-ui/src/main/java/org/xwiki/test/ui/po/InlinePage.java Log Message: ----------- XWIKI-23771: AWM: Numeric field accepts invalid characters, causing server error on edit (#5830) * XWIKI-23771: AWM: Numeric field accepts invalid characters, causing server error on edit * Added the proper type to the input * Added an exception message that's straightforward * XWIKI-23771: AWM: Numeric field accepts invalid characters, causing server error on edit * Added tests * XWIKI-23771: AWM: Numeric field accepts invalid characters, causing server error on edit * Cleared up the checkstyle suppress * XWIKI-23771: AWM: Numeric field accepts invalid characters, causing server error on edit * Fixed NumberClassTest for the new localized exception message * XWIKI-23771: AWM: Numeric field accepts invalid characters, causing server error on edit * Reuse ClassSheetPage.clickTemplateLink() instead of a new page-object method * XWIKI-23771: AWM: Numeric field accepts invalid characters, causing server error on edit * Fixed unwanted change * XWIKI-23771: AWM: Numeric field accepts invalid characters, causing server error on edit * Updated an incorrect translation value that ended in an unexpected double dot at the end with wrapping. * XWIKI-23771: AWM: Numeric field accepts invalid characters, causing server error on edit * Added a justification comment for the checkstyle:MultipleStringLiterals suppression * XWIKI-23771: AWM: Numeric field accepts invalid characters, causing server error on edit * Added step, min and max attributes to the Number field's HTML5 number input * Added data-validation-* attributes with localized messages for bad input and out-of-range values * Reverted the fromString() exception message to a non-localized, technical message * Replaced the misplaced core.validation.number.message.invalidFormat exception key with properly namespaced client-validation keys * Approximated the previous input width via an inline style since size is ignored on type=number * XWIKI-23771: AWM: Numeric field accepts invalid characters, causing server error on edit * Added InlinePage.isFieldValid() to check a form field's HTML5 constraint validation * XWIKI-23771: AWM: Numeric field accepts invalid characters, causing server error on edit * Made both NumberClassFieldIT tests use TestReference directly instead of sharing a space * Removed the redundant @BeforeEach, loginAsSuperAdmin() call and @Order annotations * Replaced the getDriver().executeScript() call with InlinePage.isFieldValid() * Made the invalid-input assertion tolerant of both the Firefox and Chrome behaviors * Replaced the server round-trip overflow test with a client-side out-of-range test * XWIKI-23771: AWM: Numeric field accepts invalid characters, causing server error on edit * Added a displayEdit() test verifying the step/min/max/data-validation-* attributes * Used verify() on the localization manager instead of asserting a mocked return value * XWIKI-23771: AWM: Numeric field accepts invalid characters, causing server error on edit * Restored a localized fromString() exception message * Moved the message key out of the core.validation.* namespace reserved for data-validation-* attributes * Updated NumberClassTest to verify the localization call instead of asserting the mocked string * XWIKI-23771: AWM: Numeric field accepts invalid characters, causing server error on edit * Removed the inline style shrinking the Number field input * Clamped min/max for the long type to the safe integer range * XWIKI-23771: AWM: Numeric field accepts invalid characters, causing server error on edit * Shortened two comments in NumberClass * XWIKI-23771: AWM: Numeric field accepts invalid characters, causing server error on edit * Removed the checkstyle:MultipleStringLiterals suppression by reusing XCLASSNAME * XWIKI-23771: AWM: Numeric field accepts invalid characters, causing server error on edit * Fixed the stale @since tag on NumberClassFieldIT * Fixed the alphabetical order in ApplicationResources.properties * Replaced assertTrue(!...) with assertFalse(...) and added failure messages in NumberClassFieldIT * Parameterized the displayEdit() unit test over all four number types To unsubscribe from these emails, change your notification settings at https://github.com/xwiki/xwiki-platform/settings/notifications
participants (1)
-
XWiki Notifications