Fixed typo
Added logic to modify class of main element on validation