Merge pull request #141 from mredigonda/issue-108
Fixes minimum size of titles.
This commit is contained in:
commit
8bf8ed5223
|
@ -5,7 +5,7 @@ const FormField = ReactMock();
|
|||
|
||||
// COMPONENT
|
||||
const Form = requireUnit('core-components/form', {
|
||||
'lib-app/validations/validations-factory': ValidationFactoryMock,
|
||||
'lib-app/validations/validator-factory': ValidationFactoryMock,
|
||||
'core-components/form-field': FormField,
|
||||
'core-components/text-editor': TextEditorMock
|
||||
});
|
||||
|
|
|
@ -3,7 +3,7 @@ import _ from 'lodash';
|
|||
import classNames from 'classnames';
|
||||
|
||||
import {reactDFS, renderChildrenWithProps} from 'lib-core/react-dfs';
|
||||
import ValidationFactory from 'lib-app/validations/validations-factory';
|
||||
import ValidationFactory from 'lib-app/validations/validator-factory';
|
||||
|
||||
import FormField from 'core-components/form-field';
|
||||
import TextEditor from 'core-components/text-editor';
|
||||
|
|
|
@ -7,7 +7,7 @@ import ListValidator from 'lib-app/validations/list-validator';
|
|||
let validators = {
|
||||
'DEFAULT': new Validator(),
|
||||
'NAME': new LengthValidator(2, 'ERROR_NAME'),
|
||||
'TITLE': new LengthValidator(10, 'ERROR_TITLE'),
|
||||
'TITLE': new LengthValidator(1, 'ERROR_TITLE'),
|
||||
'EMAIL': new EmailValidator(),
|
||||
'TEXT_AREA': new LengthValidator(10, 'ERROR_CONTENT_SHORT'),
|
||||
'PASSWORD': new LengthValidator(6, 'ERROR_PASSWORD'),
|
||||
|
@ -23,4 +23,4 @@ class ValidatorFactory {
|
|||
}
|
||||
}
|
||||
|
||||
export default ValidatorFactory;
|
||||
export default ValidatorFactory;
|
|
@ -37,7 +37,7 @@ class AddArticleController extends Controller {
|
|||
'permission' => 'staff_2',
|
||||
'requestData' => [
|
||||
'title' => [
|
||||
'validation' => DataValidator::length(3, 100),
|
||||
'validation' => DataValidator::length(1, 100),
|
||||
'error' => ERRORS::INVALID_NAME
|
||||
],
|
||||
'content' => [
|
||||
|
@ -71,4 +71,4 @@ class AddArticleController extends Controller {
|
|||
'articleId' => $article->store()
|
||||
]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue