We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Description: Check the following sample.
import ballerina/io; import ballerina/constraint; type Album readonly & record {| @constraint:String { maxLength: 5, minLength: 1 } string title; string artist; |}; public function main() returns error? { Album a = { artist: "test", title: "testss" }; Album validAlbum = check constraint:validate(a); io:println(validAlbum); }
Ideally this should return an error. Instead it prints the value successfully.
{"title":"testss","artist":"test"}
constraint- v1.0.1
The text was updated successfully, but these errors were encountered:
readonly
TharmiganK
Successfully merging a pull request may close this issue.
Description:
Check the following sample.
Ideally this should return an error. Instead it prints the value successfully.
constraint- v1.0.1
The text was updated successfully, but these errors were encountered: