vpmalley / jetlag

Bases of a future travel blog platform
MIT License
1 stars 0 forks source link

HTTP 400 when creating new article #49

Closed Vallenain closed 8 years ago

Vallenain commented 8 years ago

I might do things wrong but when creating a new article (POST request on /api/0.1/articles), I get this HTTP 400 error. My payload is:

authorUsers:[]
descriptionPicture:null
descriptionText:""
id:null
is_draft:true
is_public:false
paragraphs:[]
title:""
travelbook:{id: 1}
url:""

capture

vpmalley commented 8 years ago

Yeah, the constraint not met is the title that is required to have at least 3 characters.

You can see and update the constraints in Jetlag\Business\Article: static $creationRules = [ 'title' => 'required|min:3|max:200', 'description_text' => 'max:500', 'descriptionMediaUrl' => 'max:200', 'is_draft' => 'boolean', ];