Welcome Guest, Not a member yet? Register   Sign In
Applying CSS to the error messages
#1

[eluser]Unknown[/eluser]
How can I apply CSS to the error text that is being shown when the input doesn't pass the validation?
For example I want to make the text "Error: At least 9 characters are required ..." in red colour when I enter less than 9 characters in the form with:
Code:
<input type="text" name="phone" id="phone" value="<?php echo set_value('phone')?>" class"title required valid-numeric minLength:9 maxLength:9"
#2

[eluser]Simian Studios[/eluser]
What validation are you running on that field? Is it through CI, or through some kind of client-side JavaScript validator? Looking at your class attribute, it seems to be the latter, so you would need to check the documentation for whatever validation script you're using to see what class it gives its error messages, and then apply the CSS to that.




Theme © iAndrew 2016 - Forum software by © MyBB