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
|
||||
],
|
||||
'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
|
||||
],
|
||||
'content' => [
|
||||
|
|
|
@ -9,7 +9,7 @@ class Content extends AbstractRule {
|
|||
$content = str_replace(" ",'',preg_replace("/<\s*[^>]*>/",'',$content));
|
||||
|
||||
if($content == '') return false;
|
||||
if(strlen($content) > 1250) return false;
|
||||
if(strlen($content) > 10000) return false;
|
||||
return true;
|
||||
}
|
||||
}
|
|
@ -47,7 +47,7 @@ describe '/ticket/create' do
|
|||
|
||||
it 'should fail if the ticket has a very large content' do
|
||||
long_text = ''
|
||||
6000.times {long_text << 'a'}
|
||||
10001.times {long_text << 'a'}
|
||||
|
||||
result = request('/ticket/create',{
|
||||
title: 'Winter is coming',
|
||||
|
|
Loading…
Reference in New Issue