Welcome Guest, Not a member yet? Register   Sign In
1 error message at the time, custom regexp check on field

[quote author="CrustyDOD" date="1224600091"]1 error message at the time
Right now as far as i know (just started using CI) you have two options:
- Show ALL error messages at once
- Show error message per field (still shows more then just one error message)

I would like to show only one error message at the time by calling just one function. Is there a functions in the CI core right now that does this?
I can see your point but i think it will make the error message mechanism too complex. What you want is a hierarchy in the rules based on first come first served. You would have to set some sort of flag if the rules are hierarchy based or not and then you have to change the way run works.

[quote author="CrustyDOD" date="1224600091"]custom regexp check on field
Is there a rule for custom regexp on a field?
Let's say i have drop down with values 1 and 2. I want to check that what someone submitted really is a value 1 or 2, and not 0, 3,4,5,... (faking form in this case).[/quote]
There is no general regex rule. All regex rules are in a method.

I don't think someone wrote these things so go ahead Wink

Messages In This Thread
1 error message at the time, custom regexp check on field - by El Forum - 10-21-2008, 04:13 AM

Theme © iAndrew 2016 - Forum software by © MyBB