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 ca7d5fc commit 62cae59Copy full SHA for 62cae59
lua/nui-components/validators.lua
@@ -40,4 +40,42 @@ function M.compose(...)
40
end
41
42
43
+function M.none(...)
44
+ local validators = { ... }
45
+ return function(value)
46
+ for _, fn in ipairs(validators) do
47
+ if fn(value) then
48
+ return false
49
+ end
50
51
+ return true
52
53
+end
54
+
55
+function M.any(...)
56
57
58
59
60
61
62
63
64
65
66
67
+function M.all(...)
68
69
70
71
72
+ if not fn(value) then
73
74
75
76
77
78
79
80
81
return M
0 commit comments