From e77b47717ef9cdf3f00582b79a276ede73afe305 Mon Sep 17 00:00:00 2001 From: snipe Date: Tue, 26 Nov 2013 02:04:29 -0500 Subject: [PATCH] More validation --- app/models/Location.php | 1 + app/models/Model.php | 1 + 2 files changed, 2 insertions(+) diff --git a/app/models/Location.php b/app/models/Location.php index 75bbb19e358b..99bdafdf6b44 100644 --- a/app/models/Location.php +++ b/app/models/Location.php @@ -10,6 +10,7 @@ class Location extends Elegant { 'city' => 'required|alpha_dash|min:3', 'state' => 'required|alpha|min:2|max:2', 'country' => 'required|alpha|min:2|max:2', + 'zip' => 'alpha_dash|min:5', ); public function has_users() diff --git a/app/models/Model.php b/app/models/Model.php index 28084fb9bb26..0ce54539e210 100644 --- a/app/models/Model.php +++ b/app/models/Model.php @@ -5,6 +5,7 @@ class Model extends Elegant { // Declare the rules for the form validation protected $rules = array( 'name' => 'required|alpha_dash|min:3', + 'modelno' => 'alpha_dash|min:1', 'category_id' => 'required|integer', );