mirror of
https://github.com/status-im/status-desktop.git
synced 2025-02-19 18:18:38 +00:00
fix: Error message is misleading when pasting bio longer than 240 chars
de-synchronized charLimit and input.maximumLength for Profile Description bio properties to get the UX identical to mobile. Fixes: #14879
This commit is contained in:
parent
bcb9d787c8
commit
70bdd9140f
@ -48,15 +48,24 @@ Item {
|
|||||||
|
|
||||||
label: qsTr("Bio")
|
label: qsTr("Bio")
|
||||||
placeholderText: qsTr("Tell us about yourself")
|
placeholderText: qsTr("Tell us about yourself")
|
||||||
|
input.maximumLength : 32767
|
||||||
charLimit: 240
|
charLimit: 240
|
||||||
multiline: true
|
multiline: true
|
||||||
minimumHeight: 108
|
minimumHeight: 108
|
||||||
maximumHeight: 108
|
maximumHeight: 108
|
||||||
input.verticalAlignment: TextEdit.AlignTop
|
input.verticalAlignment: TextEdit.AlignTop
|
||||||
validators: [
|
validators: [
|
||||||
|
StatusValidator {
|
||||||
|
name: "maxLengthValidator"
|
||||||
|
validate: function (t) { return t.length <= bioInput.charLimit}
|
||||||
|
errorMessage: qsTr("Bio can’t be longer than %n character(s)", "", bioInput.charLimit)
|
||||||
|
},
|
||||||
StatusRegularExpressionValidator {
|
StatusRegularExpressionValidator {
|
||||||
regularExpression: Constants.regularExpressions.asciiWithEmoji
|
regularExpression: Constants.regularExpressions.asciiWithEmoji
|
||||||
errorMessage: qsTr("Invalid characters. Standard keyboard characters and emojis only.")
|
errorMessage: qsTr("Invalid characters. Standard keyboard characters and emojis only.")
|
||||||
|
validate: function (value) {
|
||||||
|
return (regularExpression.test(value) || (value.length === 0));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
input.tabNavItem: displayNameInput.input.edit
|
input.tabNavItem: displayNameInput.input.edit
|
||||||
|
Loading…
x
Reference in New Issue
Block a user