-1

I am using multiple conditions for validating a field in my form using jquery validation engine. I want to show the user if a condition is satisfied with a green background colour. currently my validation looks like this:

enter image description here

Now when the first condition is satisfied, The background colour of first line should turn green.But it is disappearing now. Is that possible using jquery validation engin js?

I want something like this: enter image description here

Sparky
  • 98,165
  • 25
  • 199
  • 285
siva
  • 525
  • 2
  • 14
  • Please be more mindful when tagging. jQuery Validate plugin is not the same as the jQuery Validation Engine. – Sparky Nov 12 '14 at 16:01

1 Answers1

1

Yes it is possible. on Success event validator engine will add "valid" class to the input. So, using valid class you can do your styling.

FIDDLE: http://jsfiddle.net/kiranvarthi/kyK4G/358/

input.valid { border: 1px solid green; background: green; }
KiV
  • 2,225
  • 16
  • 18
  • I dont want to turn the text box to green. I want to show the popup message box in green. – siva Nov 12 '14 at 09:14
  • The OP asked about the "jQuery Validation Engine" and your jsFiddle is using the jQuery Validate plugin... something else entirely. – Sparky Nov 12 '14 at 16:02