Skip to content

Commit 5c67255

Browse files
committed
docs: we should check max length first
1 parent cf9b56d commit 5c67255

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

  • user_guide_src/source/tutorial/create_news_items

user_guide_src/source/tutorial/create_news_items/002.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ public function create()
2424

2525
// Checks whether the submitted data passed the validation rules.
2626
if (! $this->validateData($post, [
27-
'title' => 'required|min_length[3]|max_length[255]',
28-
'body' => 'required|min_length[10]|max_length[5000]',
27+
'title' => 'required|max_length[255]|min_length[3]',
28+
'body' => 'required|max_length[5000]|min_length[10]',
2929
])) {
3030
// The validation fails, so returns the form.
3131
return view('templates/header', ['title' => 'Create a news item'])

0 commit comments

Comments
 (0)