docs: fix limit text length code (#13752)

This commit is contained in:
Shahed Nasser
2025-10-16 08:23:29 +03:00
committed by GitHub
parent 8642d41aac
commit a5df43cde7
3 changed files with 48 additions and 15 deletions
@@ -76,7 +76,10 @@ const Post = model.define("post", {
// ...
})
.checks([
(columns) => `${columns.name.length} <= 50`,
{
name: "limit_name_length",
expression: (columns) => `LENGTH(${columns.name}) <= 50`,
}
])
export default Post