increase length liming content, allowes title-articles with 1 caracted

This commit is contained in:
Guillermo Giuliana 2020-02-05 16:43:14 -03:00
parent 364aca247e
commit aedae876d6
3 changed files with 3 additions and 3 deletions

View File

@ -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' => [

View File

@ -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;
}
}

View File

@ -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',