Problem/Motivation
Anybody typing with two hands an element with a machine name, then hitting submit will almost certainly end up with an "Machine name is required" error, or worse as a developer, a 1 or 2 character machine name, meaning you have to delete and restart again.
After the validation error has happened, the machine name field is not automatically populated from the label value.
Steps to replicate:
- Visit /admin/people/roles/add
- Type anything and hit enter
Example forms where the problem exists
- Role add: /admin/people/roles/add
- Field add:/admin/structure/types/manage/{node_type}/fields/add-field
- Webform field add - see #3052152: Key is not automatically populated after validation failure on blank title
I thought I saw some AJAX validation which would have explained this, but I must have been dreaming.
Dependency evaluation for transliteration.js.
1. Maintainership of the package:
Transliteration.js is not well maintained as the last major version came back in 2018.
2. Security policies of the package:
Transliteration.js has not had any reported security issues to date. The library is well documented.
3. Expected release and support cycles:
There is no mention of the release cycle.
4. Code quality:
The codebase of Transliteration.js is well written, well documented, and adheres to best practices.
5. Other dependencies it would add:
Transliteration.js has no additional dependencies beyond the basic Javascript language libraries.
Proposed resolution
If AJAX, validation should happen asynchronously of the value typed.
If JavaScript, some profiling and speeding up is highly desirable ;)
Remaining tasks
--
User interface changes
None
API changes
None?