Attributes used: placeholder (for displaying a ghost example value), pattern, required (empty = invalid)...

Edit in JS Bin