Server validation only

General issues related to the use of Metro 4
Post Reply
Autoflow
Posts: 9
Joined: Thu Jul 11, 2019 7:17 pm
Status: Offline

Server validation only

Post by Autoflow » Thu Aug 01, 2019 11:12 am

Hi,

I just wrack my brain how to get server-side validation to apply invalid styles to input elements.
Within bootstrap3 it was possible to add class "invalid" to any input element directly.
As Metro builds wrappers around input elements - like select's - it's not as easy possible.
Do you have a hint for me ?

User avatar
olton
Site Admin
Posts: 230
Joined: Mon Apr 09, 2018 6:19 pm
Location: Kiev, Ukraine
Status: Offline

Post by olton » Thu Aug 01, 2019 3:11 pm

$('#inp').closest('.input').addClass('invalid');

Post Reply