0

Possible Duplicate:
HTML5 form required attribute. Set custom validation message?

in HTML 5 form validation

<form>
<input type="txt" required id="username"/>
</form>

this required filed will always shows the message "Please enter filed"

Is there a way to customize this message ?

Community
  • 1
  • 1
Sudantha
  • 14,804
  • 42
  • 102
  • 158

2 Answers2

3

Not all browsers will support this attribute, Firefox does support it, IE and chrome no. I dont know about the other browsers.

using value="Your value" mentioned above won't work. i just tried it.

i guess we have to wait till HTML5 becomes stable. to find out

Rami Sarieddine
  • 5,213
  • 32
  • 39
1
<input type="txt" required id="username" value="Your value" />
patapizza
  • 2,374
  • 15
  • 14