Task #1711
closedTrim or warn about leading and trailing whitespaces
100%
Description
Version 9.6 (current)
It's a common mistake when administrators copy values to the configuration, that they copy leading or trailing whitespace. E.g. when you set " org.postgresql.Driver" to the Database Table connector, it fails to find the driver. The extra whitespace is hard to notice.
Also when users manually fill in some text fields, they sometimes use whitespace by accident.
It would be really helpful to trim the whitespace in text fields, or at least warn about it. Everywhere :-)
Related issues
Updated by Alena Peterová over 4 years ago
This would really help with this known error in AD connector: https://wiki.czechidm.com/tutorial/adm/manage_ad?#ldapgroups_not_returned
Updated by Vít Švanda over 4 years ago
- Assignee changed from Radek Tomiška to Ondrej Husník
- Target version set to 10.1.0
Updated by Ondrej Husník over 4 years ago
- Status changed from New to In Progress
Updated by Ondrej Husník over 4 years ago
More precise definition of the task:
1) user is warned about presence of leading/trailing whitespaces.
2) this warning is supposed to be a "soft" warning which only informs, but doesn't prevent form saving or other actions
3) this feature is available for TextField and TextArea components and is enabled by default.
4) the warning is displayed immediately after a form, containing some leading/trailing whitespaces, is opened
Updated by Ondrej Husník over 4 years ago
- Status changed from In Progress to Needs feedback
- Assignee changed from Ondrej Husník to Radek Tomiška
- % Done changed from 0 to 90
Please be so kind and provide me a feedback for this task. It seems it works properly as was arranged.
Thank you.
https://github.com/bcvsolutions/CzechIdMng/pull/68/commits/1b8fd083f3322a37d53dc19b6172736a102b7d1c
Updated by Radek Tomiška over 4 years ago
- Status changed from Needs feedback to Resolved
- Assignee changed from Radek Tomiška to Ondrej Husník
- % Done changed from 90 to 100
I did test and code review, it works and code looks nice, thx for this awesome feature!
Merged into develop.
Note: I personally prefer method name "isTrimmable" (the same as notification message) :)
Updated by Ondrej Husník over 4 years ago
- Status changed from Resolved to Needs feedback
- Assignee changed from Ondrej Husník to Radek Tomiška
I'd like to ask you for a feedback of small changes we arranged before.
It seems it's working properly even after changes in AbstarctFormComponent.validation method.
Thanks.
https://github.com/bcvsolutions/CzechIdMng/pull/69/commits/34e5b97957fe814788c9cc31bcf7b071837d487e
Updated by Radek Tomiška over 4 years ago
- Status changed from Needs feedback to Resolved
- Assignee changed from Radek Tomiška to Ondrej Husník
Thx, it's awesome!
Merged into develop.
Updated by Radek Tomiška about 4 years ago
- Status changed from Resolved to Closed
Updated by Radek Tomiška over 3 years ago
- Related to Task #1111: Trim the whitespaces in reg form added