P
P
paulvales2015-10-30 15:22:12
JavaScript
paulvales, 2015-10-30 15:22:12

How to set the view to the wrong fields after submit?

Hello. if you set the style for the :invalid selector, then it is applied immediately, i.e. when the fields are still empty. How can I make, roughly speaking, inputs with incorrect data be in a red border after submit?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
T
twobomb, 2015-10-30
@paulvales

Ну вот примерно так можно сделать https://jsfiddle.net/ov4non3j/

I
inDeepCode, 2015-10-30
@inDeepCode

<form ... onsubmit="validator()">
</form>

L
L0k1, 2015-10-30
@L0k1

Well, add a class to these inputs, and remove them when they become valid. what is the problem?
Or are we able to download all sorts of bootstraps, but does everything else baffle?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question