|
|
@@ -17,7 +17,7 @@ class DescriptionCreateController
|
|
|
try {
|
|
|
v::key('product_id', v::intType()->positive())
|
|
|
->key('company_id', v::intType()->positive())
|
|
|
- ->key('description_text', v::stringType()->notEmpty())
|
|
|
+ ->key('description_text', v::stringType()->notEmpty()->regex('/^[\p{L}\p{N}\s\-\'\"]+$/u'))
|
|
|
->assert($body);
|
|
|
} catch (ValidationException $e) {
|
|
|
return ResponseLib::sendFail("Validation failed: " . $e->getFullMessage(), [], "E_VALIDATE")->withStatus(401);
|