Cat Photos
Click here to view more cat photos.
Cat Lists
Things cats love:
- cat nip
- laser pointers
- lasagna
Top 3 things cats hate:
- flea treatment
- thunder
- other cats
--- id: 5ef9b03c81a63668521804db title: Passo 40 challengeType: 0 dashedName: step-40 --- # --description-- Para evitar que um usuário envie o formulário quando as informações necessárias estiverem faltando, você precisa adicionar o atributo `required` a um elemento `input`. Não há a necessidade de definir um valor para o atributo `required`. Em vez disso, apenas adicione a palavra `required` (obrigatório) ao elemento `input`, certificando-se de que haja um espaço entre esse atributo e os outros. # --hints-- Você excluiu o elemento `input` ou ele tem uma sintaxe inválida. Os valores de todos os atributos devem estar cercados com aspas. ```js assert($('input').length); ``` O elemento `form` deve conter apenas o elemento `input`. Remova os elementos HTML ou o texto adicionais do elemento `form`. ```js assert( $('form')[0].children.length === 1 && $('form')[0].innerText.trim().length === 0 ); ``` O elemento `input` deve ter o atributo `required`. Lembre-se: você deve apenas adicionar a palavra `required` dentro da tag do elemento `input`. ```js assert($('input')[0].hasAttribute('required')); ``` Não deve ser dado algum valor para o atributo `required`. ```js assert($('input')[0].getAttribute('required') === ''); ``` # --seed-- ## --seed-contents-- ```html
Click here to view more cat photos.