-
Notifications
You must be signed in to change notification settings - Fork 7.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
form_validation lang 'valid_url', but no method #1966
Comments
Additionally, if a rule can't be found, the form validation class logs a message, |
Well, that's strange ... there was never a valid_url rule, but that language line has existed during all the time since CI 1.0. |
Did some diggin. It looks like some apps use the lang line independently from form_validation. maybe add a method to form_validation then?
edit: FILTER_VALIDATE_URL is maybe not appropriate. |
invalid_url has nothing to do with this. Otherwise, I guess we can add a |
As mentioned above, i'ld like to suggest raising the error level when using rules with non-existing functions. |
You no longer want to implement and submit a PR with the rule method? You could include the error-level change in there. |
yes, will do. Need some time. seems there are some issues with filter_var in php 5.2.13 |
Implemented, see the above commit. |
Hey valid_url rule seems not work on my CI 3.0, e.g. an invalid url like "test" passes the test. Advise. @narfbg |
@profnandaa I think that is intentional, have a look at Narfs comment on #3478 |
While trying to test issue #1850 i saw that the reporter uses
a valid_url rule in the form validation set_rules
There is no method or function named
valid_url()
anywhere, so the rule will actually never validate to TRUE.However, there is a language line for valid_url here:
https://github.com/EllisLab/CodeIgniter/blob/develop/system/language/english/form_validation_lang.php#L33
shouldn't either that line be removed to prevent confusion, or a method be added to actually test for valid_url() ?
The text was updated successfully, but these errors were encountered: