Regular Expression Validation becomes /[object Object]/ after the first submission in the Edit Form

* Describe the bug

I set a Pattern Validation Rule for a string (single line text) field, e.g. \d{4}. The validation only worked for the first editing. Subsequently, it always throws an error warning: “Study ID” with value “1001” fails to match the required pattern: /[object Object]/. It seems the regex expression was changed internally after the first submission.

* Environment

  • NocoBase version: v2.0.0-alpha.56
  • Database type and version: PostgreSQL 16
  • OS: Server - Ubuntu 24.04.3 LTS, Client - Windows 11
  • Deployment Methods: Docker
  • Docker image version: nocobase/nocobase:2.0.0-alpha.56-full
  • NodeJS version: NA

* How To Reproduce

  1. To set a Pattern Validation Rule (e.g. \d{4}) for a string (single line text) field (e.g. Study ID).
  2. The validation only worked for the first submission in the Edit Form. Subsequently, it always throws an error warning: “Study ID” with value “1001” fails to match the required pattern: /[object Object]/.

Expected behavior

It can check the field value against the regex expression.

Screenshots

NA

Logs

I don’t see any error log generated in docker compose logs when it gives the error warning in the Edit Form.

Hello, I couldn’t reproduce your problem. Please reproduce it in the demo and provide the link to reproduce it.
https://a_8hwne7u84ho.v13.demo.nocobase.com/admin/

I have reproduced the bug in the demo. Thanks.

I didn’t reproduce the situation you described on the same page. Is it because you copied the data?

I can reproduce the bug situation in Chrome, Firefox and Brave browsers. Furthermore, I have set the pattern validation rule to be \d{4} for the field Study ID. However, Study ID “1234567567” can be still saved in the collection. It could be a bug.

I cannot reproduce your problem.

My PC is Windows 11 Enterprise (Version: 24H2, OS build: 26100.6899). Each browser (Edge, Chrome, Firefox, and Brave) in my PC can reproduce this bug. Could you investigate this bug? Do you need any logs? Thanks.

Recording 2025-12-22 171506

Thank you for reporting the issue. Please wait while we fix it.

The bug has been fixed. Please upgrade to the latest version and check if the problem is resolved.