Fix: description was required
This commit is contained in:
parent
a410fd4473
commit
199e41ec93
@ -78,7 +78,8 @@ class InputService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public function filterComment($comment) {
|
public function filterComment($comment) {
|
||||||
$filtered = filter_var($comment, FILTER_SANITIZE_STRING);
|
$comment = str_replace("\r\n", "\n", $comment);
|
||||||
|
$filtered = filter_var($comment, FILTER_VALIDATE_REGEXP, ['options' => ['regexp' => COMMENT_REGEX]]);
|
||||||
return $this->returnIfNotBlank($filtered);
|
return $this->returnIfNotBlank($filtered);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -25,8 +25,8 @@ const POLL_REGEX = '/^[a-z0-9]+$/i';
|
|||||||
const CHOICE_REGEX = '/^[012]$/';
|
const CHOICE_REGEX = '/^[012]$/';
|
||||||
const NAME_REGEX = '/^[áàâäãåçéèêëíìîïñóòôöõúùûüýÿæœa-z0-9_ -]+$/i';
|
const NAME_REGEX = '/^[áàâäãåçéèêëíìîïñóòôöõúùûüýÿæœa-z0-9_ -]+$/i';
|
||||||
const TITLE_REGEX = '/^[áàâäãåçéèêëíìîïñóòôöõúùûüýÿæœa-z0-9\\/ &"\'(_)=~#{|`^@}$[\\]\\\\,;:!?.*-]+$/i';
|
const TITLE_REGEX = '/^[áàâäãåçéèêëíìîïñóòôöõúùûüýÿæœa-z0-9\\/ &"\'(_)=~#{|`^@}$[\\]\\\\,;:!?.*-]+$/i';
|
||||||
const DESCRIPTION_REGEX = "/^[áàâäãåçéèêëíìîïñóòôöõúùûüýÿæœa-z0-9\\/ &\"'(_)=~#{|`^@}$[\\]\\\\,;:!?.*\n-]+$/i";
|
const DESCRIPTION_REGEX = "/^[áàâäãåçéèêëíìîïñóòôöõúùûüýÿæœa-z0-9\\/ &\"'(_)=~#{|`^@}$[\\]\\\\,;:!?.*\n-]*$/i";
|
||||||
const COMMENT_REGEX = DESCRIPTION_REGEX;
|
const COMMENT_REGEX = "/^[áàâäãåçéèêëíìîïñóòôöõúùûüýÿæœa-z0-9\\/ &\"'(_)=~#{|`^@}$[\\]\\\\,;:!?.*\n-]+$/i";
|
||||||
const BOOLEAN_REGEX = '/^(on|off|true|false|1|0)$/i';
|
const BOOLEAN_REGEX = '/^(on|off|true|false|1|0)$/i';
|
||||||
const BOOLEAN_TRUE_REGEX = '/^(on|true|1)$/i';
|
const BOOLEAN_TRUE_REGEX = '/^(on|true|1)$/i';
|
||||||
const EDITABLE_CHOICE_REGEX = '/^[0-2]$/';
|
const EDITABLE_CHOICE_REGEX = '/^[0-2]$/';
|
||||||
|
Loading…
Reference in New Issue
Block a user