I'm sure you already know that the required is part of HTML 5. But did you know that by using the new input types, you can also have some validation provided automatically? For example, type="email" will produce a complaint if the user doesn't enter a valid email address. The HTML would be:
<input type="email" name="email" placeholder="[email protected]">
And if you don't enter a proper address, you get an indicator similar to the one you showed that asks the user to enter a valid email address.