Remove placeholder during validation
Hi all,
I am using a validation plugin and it shows the text "This field is required" when the required field is not given. I also have placeholder in some fields and so validation text appears over the placeholder text.
So how can I remove the placeholder when validation text appears?
Code is simple, I just have to add class="required" in fields wherever that are mandatory,
<
div
data-role
=
"fieldcontain"
>
<
label
for
=
"text"
>Text input:</
label
>
<
input
name
=
"text"
id
=
"text"
type
=
"text" class="required"
>
</
div
>
I am also attaching a pic to show how it appears.
I am using this plugin,
http://jqueryvalidation.org/
Thanks!!