Skip to content

Commit

Permalink
Changed validators to regexp validators
Browse files Browse the repository at this point in the history
IntValidator limits to 32bit int (JavaScript limitation) and therefor
the input fields are limited in length.
  • Loading branch information
obscuren committed May 13, 2014
1 parent 7f94b26 commit faa3073
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
6 changes: 3 additions & 3 deletions ethereal/assets/qml/newTransaction/_new_contract.qml
Original file line number Diff line number Diff line change
Expand Up @@ -61,15 +61,15 @@ Component {
id: txValue
width: 200
placeholderText: "Amount"
validator: IntValidator { }
validator: RegExpValidator { regExp: /\d*/ }
onTextChanged: {
contractFormReady()
}
}
TextField {
id: txGas
width: 200
validator: IntValidator { }
validator: RegExpValidator { regExp: /\d*/ }
placeholderText: "Gas"
onTextChanged: {
contractFormReady()
Expand All @@ -79,7 +79,7 @@ Component {
id: txGasPrice
width: 200
placeholderText: "Gas price"
validator: IntValidator { }
validator: RegExpValidator { regExp: /\d*/ }
onTextChanged: {
contractFormReady()
}
Expand Down
3 changes: 2 additions & 1 deletion ethereal/assets/qml/newTransaction/_simple_send.qml
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,10 @@ Component {
}
TextField {
id: txSimpleValue
width: 200
placeholderText: "Amount"
anchors.rightMargin: 5
validator: IntValidator { }
validator: RegExpValidator { regExp: /\d*/ }
onTextChanged: { checkFormState() }
}
Button {
Expand Down

0 comments on commit faa3073

Please sign in to comment.