From 42f8c252c01d30dd0ada6c88b5f05b68201d351c Mon Sep 17 00:00:00 2001 From: SunDi3yansyah Date: Mon, 26 Oct 2015 01:52:17 +0700 Subject: [PATCH] revision from SunDi3yansyah yang ganteng revision form_validation & add 2 form_validation --- form_validation.sublime-snippet | 2 +- form_validation_run.sublime-snippet | 14 ++++++++++++++ form_validation_set_value.sublime-snippet | 10 ++++++++++ 3 files changed, 25 insertions(+), 1 deletion(-) create mode 100644 form_validation_run.sublime-snippet create mode 100644 form_validation_set_value.sublime-snippet diff --git a/form_validation.sublime-snippet b/form_validation.sublime-snippet index 571a50b..c9dd055 100644 --- a/form_validation.sublime-snippet +++ b/form_validation.sublime-snippet @@ -1,6 +1,6 @@ form_validation->set_rules('${1:fieldname}', '${2:fieldlabel}', '${3:trim|required|min_length[5]|max_length[12]|xss_clean}'); +\$this->form_validation->set_rules('${1:fieldname}', '${2:fieldlabel}', '${3:trim}|${4:required}|${5:min_length[${6:5}]}|${7:max_length[${8:12}]}|${9:xss_clean}'); ]]> form_validation diff --git a/form_validation_run.sublime-snippet b/form_validation_run.sublime-snippet new file mode 100644 index 0000000..bebc914 --- /dev/null +++ b/form_validation_run.sublime-snippet @@ -0,0 +1,14 @@ + + form_validation->run() == ${1:TRUE or FALSE}) { + ${2:# code...} +} else { + ${3:# code...} +} +]]> + + form_validation_run + + source.php + CI - Form Validation Run + diff --git a/form_validation_set_value.sublime-snippet b/form_validation_set_value.sublime-snippet new file mode 100644 index 0000000..39ed6cf --- /dev/null +++ b/form_validation_set_value.sublime-snippet @@ -0,0 +1,10 @@ + + form_validation->set_value('${1:field}') +]]> + + form_validation_sv + + source.php + CI - Form Validation Set Value +