Lets say that I have this json:
{"name": "John"}
And I want to restrict the json from containing the substring "my name is", so if I receive:
{"name": "my name is John"}
Cerberus will me that the json is not correct and I can display the correct output, so far I have tried the "forbidden"
field but it does not work, because forbidden only takes the exact phrase, this is how I have so far the cerberus validation:
{
"name":{
"type": "string",
"minlength":1,
"forbidden":["my name is"],
}
}
Thanks!