Feature request #6912
Add data provider field validation for Q[Plain]TextEdit widgets
|Pull Request or Patch supplied:||No||Resolution:|
|Easy fix?:||No||Copied to github as #:||16035|
Currently there is QgsFieldValidator for validation of QLineEdit, editable QComboBox and numeric input widgets, because those widgets allow a validator to be readily set. QgsFieldValidator is subclassed from QValidator.
However, when using custom .ui forms for attribute editing and the mapped text field is QPlainTextEdit or QTextEdit, there is no basic field validation (e.g. field length). While it's possible to create custom validation via Python for the custom form, it would be good to offer basic field validation for those widgets in core C++.
This probably means QPlainTextEdit and QTextEdit they will need to have Qgs-prefixed subclasses so that a setValidator() method can extend them, and then QgsFieldValidator can be updated to work with those widget types. The validation could be handled on the textChanged() signal, and other appropriate (and missing) widget data provider field properties should probably be added (e.g. maxLength, like with QLineEdit).
Or, am I missing such an existing feature?