Skip to content

Commit 75c7cfd

Browse files
Fix README cel expression (#230)
Fixes #229.
1 parent 9fc35f1 commit 75c7cfd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ message Transaction {
6767
string price = 4 [(buf.validate.field).cel = {
6868
id: "transaction.price",
6969
message: "price must be positive and include a valid currency symbol ($ or £)",
70-
expression: "(this.startswith('$') or this.startswith('£')) and float(this[1:]) > 0"
70+
expression: "(this.startsWith('$') || this.startsWith('£')) && double(this.substring(1)) > 0"
7171
}];
7272
7373
option (buf.validate.message).cel = {

0 commit comments

Comments
 (0)