diff --git a/invalid-radio-message/README.md b/invalid-radio-message/README.md new file mode 100644 index 0000000..139620e --- /dev/null +++ b/invalid-radio-message/README.md @@ -0,0 +1,3 @@ +# Test d'invalidité pour choix radio + +test permettant de valider l'affichage d'un message d'erreur, css uniquement, si une selection par radio est invalide (sur un required). diff --git a/invalid-radio-message/index.html b/invalid-radio-message/index.html new file mode 100644 index 0000000..4661db3 --- /dev/null +++ b/invalid-radio-message/index.html @@ -0,0 +1,36 @@ + + + + + + + + Sample invalid check for radio slelction + + +

Sample invalid check for radio slelction

+
+
+ Attribuer une note entre 1 et 5 + + + + + +
Merci de choisir une note
+
+
+ +
+ + diff --git a/invalid-radio-message/invalid-radio.css b/invalid-radio-message/invalid-radio.css new file mode 100644 index 0000000..21ab17b --- /dev/null +++ b/invalid-radio-message/invalid-radio.css @@ -0,0 +1,9 @@ +.pj-error { + display: none; } + +input:invalid { + outline: solid red; } + input:invalid ~ .pj-error { + display: block; } + +/*# sourceMappingURL=invalid-radio.css.map */ diff --git a/invalid-radio-message/invalid-radio.css.map b/invalid-radio-message/invalid-radio.css.map new file mode 100644 index 0000000..48da41f --- /dev/null +++ b/invalid-radio-message/invalid-radio.css.map @@ -0,0 +1,7 @@ +{ +"version": 3, +"mappings": "AAAA,SAAU;EACR,OAAO,EAAC,IAAI;;AAId,aAAc;EACZ,OAAO,EAAE,SAAS;EAClB,yBAAY;IACV,OAAO,EAAC,KAAK", +"sources": ["invalid-radio.scss"], +"names": [], +"file": "invalid-radio.css" +} \ No newline at end of file diff --git a/invalid-radio-message/invalid-radio.scss b/invalid-radio-message/invalid-radio.scss new file mode 100644 index 0000000..0b5a8dd --- /dev/null +++ b/invalid-radio-message/invalid-radio.scss @@ -0,0 +1,11 @@ +.pj-error { + display:none; +} + + +input:invalid { + outline: solid red; + ~ .pj-error { + display:block; + } +} \ No newline at end of file