mirror of
https://github.com/opensupports/opensupports.git
synced 2025-07-29 08:44:58 +02:00
increase length liming content, allowes title-articles with 1 caracted
This commit is contained in:
parent
364aca247e
commit
aedae876d6
@ -43,7 +43,7 @@ class EditArticleController extends Controller {
|
|||||||
'error' => ERRORS::INVALID_TOPIC
|
'error' => ERRORS::INVALID_TOPIC
|
||||||
],
|
],
|
||||||
'title' => [
|
'title' => [
|
||||||
'validation' => DataValidator::oneOf(DataValidator::notBlank()->length(5, 100),DataValidator::nullType()),
|
'validation' => DataValidator::oneOf(DataValidator::notBlank()->length(1, 200),DataValidator::nullType()),
|
||||||
'error' => ERRORS::INVALID_TITLE
|
'error' => ERRORS::INVALID_TITLE
|
||||||
],
|
],
|
||||||
'content' => [
|
'content' => [
|
||||||
|
@ -9,7 +9,7 @@ class Content extends AbstractRule {
|
|||||||
$content = str_replace(" ",'',preg_replace("/<\s*[^>]*>/",'',$content));
|
$content = str_replace(" ",'',preg_replace("/<\s*[^>]*>/",'',$content));
|
||||||
|
|
||||||
if($content == '') return false;
|
if($content == '') return false;
|
||||||
if(strlen($content) > 1250) return false;
|
if(strlen($content) > 10000) return false;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -47,7 +47,7 @@ describe '/ticket/create' do
|
|||||||
|
|
||||||
it 'should fail if the ticket has a very large content' do
|
it 'should fail if the ticket has a very large content' do
|
||||||
long_text = ''
|
long_text = ''
|
||||||
6000.times {long_text << 'a'}
|
10001.times {long_text << 'a'}
|
||||||
|
|
||||||
result = request('/ticket/create',{
|
result = request('/ticket/create',{
|
||||||
title: 'Winter is coming',
|
title: 'Winter is coming',
|
||||||
|
Loading…
x
Reference in New Issue
Block a user