diff options
author | Andrey Andreev <narf@devilix.net> | 2015-05-18 10:02:43 +0200 |
---|---|---|
committer | Andrey Andreev <narf@devilix.net> | 2015-05-18 10:02:43 +0200 |
commit | 0bb5cd4b1bc794f67f0089ae309ffa9b8000e831 (patch) | |
tree | f2bc42c12020b20d52f149d1f12e48fa6fbc8bd8 /user_guide_src | |
parent | 42743c61de725b5a21446ee2b4c2a56b71a42f20 (diff) |
[ci skip] Remove example usage of MD5 for passwords
Diffstat (limited to 'user_guide_src')
-rw-r--r-- | user_guide_src/source/libraries/form_validation.rst | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/user_guide_src/source/libraries/form_validation.rst b/user_guide_src/source/libraries/form_validation.rst index dbf1e8a63..fa50c6dcf 100644 --- a/user_guide_src/source/libraries/form_validation.rst +++ b/user_guide_src/source/libraries/form_validation.rst @@ -327,15 +327,15 @@ can also prep your data in various ways. For example, you can set up rules like this:: $this->form_validation->set_rules('username', 'Username', 'trim|required|min_length[5]|max_length[12]'); - $this->form_validation->set_rules('password', 'Password', 'trim|required|md5'); + $this->form_validation->set_rules('password', 'Password', 'trim|required|min_length[8]'); $this->form_validation->set_rules('passconf', 'Password Confirmation', 'trim|required|matches[password]'); $this->form_validation->set_rules('email', 'Email', 'trim|required|valid_email'); In the above example, we are "trimming" the fields, checking for length -where necessary and converting the password to MD5. +where necessary and making sure that both password fields match. **Any native PHP function that accepts one parameter can be used as a -rule, like htmlspecialchars, trim, md5, etc.** +rule, like ``htmlspecialchars()``, ``trim()``, etc.** .. note:: You will generally want to use the prepping functions **after** the validation rules so if there is an error, the |