--- id: 5ef9b03c81a63668521804db title: Part 40 challengeType: 0 dashedName: part-40 --- # --description-- To prevent a user from submitting your form when required information is missing, you need to add the `required` attribute to an `input` element. There's no need to set a value to the `required` attribute. Instead, just add the word `required` to the `input` element, making sure there is space between it and other attributes. # --hints-- You have either deleted your `input` element or it has invalid syntax. All attributes' values should be surrounded by quotation marks. ```js assert($('input').length); ``` Your `form` should only contain the `input` element. Remove any HTML additional elements or text within the `form` element. ```js assert( $('form')[0].children.length === 1 && $('form')[0].innerText.trim().length === 0 ); ``` Your `input` element should have a `required` attribute. Remember, you just add the word `required` inside the `input` element's tag. ```js assert($('input')[0].hasAttribute('required')); ``` A value should not be given to the `required` attribute. ```js assert($('input')[0].getAttribute('required') === ''); ``` # --seed-- ## --seed-contents-- ```html

CatPhotoApp

Cat Photos

Click here to view more cat photos.

A cute orange cat lying on its back.

Cat Lists

Things cats love:

A slice of lasagna on a plate.
Cats love lasagna.

Top 3 things cats hate:

  1. flea treatment
  2. thunder
  3. other cats
Five cats looking around a field.
Cats hate other cats.

Cat Form

--fcc-editable-region-- --fcc-editable-region--
```