Welcome Guest, Not a member yet? Register   Sign In
Form Validation Rules Bug
#1
Bug 

I found a new bug about form validation set_rules.

If we use form validation rules as:

PHP Code:
$this->form_validation->set_rules('aciklama','AÇIKLAMA','trim|strip_tags|xss_clean|prep_for_form|'); 

This is generating
Code:
Unable to access an error message corresponding to your field name.
error message in CI3. But in CI2 this isn't generating any error and runs well.

If you change this rules as:

PHP Code:
$this->form_validation->set_rules('aciklama','AÇIKLAMA','trim|strip_tags|xss_clean|prep_for_form'); 

error message removed and works again.

This bug taken my 1 hours to find it Angry
I'm a person from Turkiye. I don't know English very well and i can't write what i want to say sometimes (as now happenes  Blush ).

If i write something by mistake; please don't distress it and try to understand what i want to write.
Reply
#2

This is not a bug. Trailing | does not make sense.
If this is considered as a bug, the bug was in 2.x and fixed in 3.0
Reply
#3

Now 1 hour is 1 hour.
When you are writing / validating code you must follow standards. Not just to believe that the framework will cover 100% of any possible mistake.

As slax0r notice in this case its more a Bug if its not making error notices because your syntax has a mistake and it should be fixed.
You know what is doing base PHP when there is a syntax error..
Best VPS Hosting : Digital Ocean
Reply
#4

I had the same issue so was glad to find this thread ;-) I've also spent an hour+ getting to the bottom of this.

Although this change probably does not amount to a bug, it should probably be included in the upgrade notes from 2.x to 3.x as previously accepted functionality is now no longer valid.
Reply
#5

i found also a bug in the CodeIgniter 3.0 is_unique method, it always returns false so i copy the is_unique method from CodeIgniter 2.0 and it's work now, but I'm not sure if it's the right thing to do...
Reply




Theme © iAndrew 2016 - Forum software by © MyBB