-
-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[forms] Validate value length for value maps #57690
Conversation
Display errors and trim the values. Fix qgis#57634
This widget always had an issue with unconstrained inputs. I agree with the proposed approach, though the more arduous problems are data mismatch. The widget will accept any value, even if the field type doesn't support this value. I don't know if this is good to include in this pr or as another one. |
I think this PR is a step forward, in the sense that it provides the API to call validation and to display errors to the user. Given the limited amount of time that I have left for this bugfixing round I'd rather prefer to keep the scope limited to fixing this particular issue, more validation rules could be added later. It would be nice to have a new ticket that lists the missing validation rules, for example the type compatibility, and I'm not sure if there is a check for unique values and descriptions. |
Display errors and trim the values.
This also works when importing from CSV or from layer.
Fix #57634