We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9fc35f1 commit 75c7cfdCopy full SHA for 75c7cfd
README.md
@@ -67,7 +67,7 @@ message Transaction {
67
string price = 4 [(buf.validate.field).cel = {
68
id: "transaction.price",
69
message: "price must be positive and include a valid currency symbol ($ or £)",
70
- expression: "(this.startswith('$') or this.startswith('£')) and float(this[1:]) > 0"
+ expression: "(this.startsWith('$') || this.startsWith('£')) && double(this.substring(1)) > 0"
71
}];
72
73
option (buf.validate.message).cel = {
0 commit comments