why is form validation having issue with spaces? |
[eluser]Unknown[/eluser]
This problem still exists in CI 2.0.3 but you can use a custom RegEx to validate your names: Code: $this->form_validation->set_rules('first_name', 'First Name', 'trim|required|callback_validate_name'); This RegEx expression will ensure that first_name contains letters, dashes and spaces only, must start with upper case letter and must not start with a dash. (source: PHP validation and verification) Hope this helps. |
Messages In This Thread |
why is form validation having issue with spaces? - by El Forum - 06-02-2011, 10:56 AM
why is form validation having issue with spaces? - by El Forum - 06-05-2011, 06:18 PM
why is form validation having issue with spaces? - by El Forum - 01-22-2012, 01:41 PM
why is form validation having issue with spaces? - by El Forum - 01-22-2012, 03:06 PM
why is form validation having issue with spaces? - by El Forum - 02-11-2012, 11:31 AM
why is form validation having issue with spaces? - by El Forum - 02-11-2012, 12:52 PM
why is form validation having issue with spaces? - by El Forum - 02-11-2012, 12:57 PM
why is form validation having issue with spaces? - by El Forum - 02-11-2012, 01:22 PM
|