feat: add whole JSON size validation and check for storage usage
This commit is contained in:
parent
fefbf15f5e
commit
2b1e35e55f
5 changed files with 72 additions and 2 deletions
|
|
@ -32,7 +32,7 @@ const email = {
|
|||
lowercase: true,
|
||||
unique: true,
|
||||
validate: {
|
||||
validator: function(v) {
|
||||
validator: function(v: string) {
|
||||
return /^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(v);
|
||||
},
|
||||
message: "Invalid email"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue