appsmith
appsmith copied to clipboard
fix:widget name validation
issue: 22259
added the validation to check if the widget name start with a number
when the widget name starts with a digit then this error is thrown:
and when the error is thrown the name of the widget is not updated.
if the widget name is valid:
similarly this condition is checked while updating any widget name.
cypress test video:
https://github.com/user-attachments/assets/05b853f8-483a-4326-9d66-1d515e4d672a
Summary by CodeRabbit
-
New Features
- Introduced validation to prevent entity names from starting with a number. Users will now receive an error if trying to rename an entity with a name that begins with a digit.
- Enhanced title editing functionality in the Property Pane to improve user interaction when input begins with a digit.
-
Tests
- Added tests to ensure CheckboxGroup cannot be renamed with names starting with a digit.
- Implemented test cases for the widget name update functionality, covering various scenarios for name inputs.