Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

215
Visualizações
'formnovalidate' and 'novalidate' present but form validations are still firing

I have a form with 1 input and 2 submit buttons, one is a Continue while the other is a Skip. I've got novalidate="novalidate" on the form and formnovalidate on the skip button. The behavior I expect is when I do not enter a value and click Submit I see the error "Must be 6 digits." but when I do not enter a value and click Skip I should not see the error "Must be 6 digits.".

All of my research says this should be enough to cancel the validation on Skip but I'm wondering if it's because I have a formaction and a formmethod on the Skip? Check it out:

<form action="/submit/form/and/redirect" method="post" novalidate>
  <input data-val="true" data-val-exactlength="Must be 6 digits." data-val-exactlength-validlengths="6" data-val-required="Must be 6 digits" id="Id" inputmode="decimal" maxlength="6" name="Id" type="text" value="">
  <button formaction="SkipAction" formmethod="post" formnovalidate="" type="submit">Skip</button>
  <button formaction="SubmitAction" formmethod="post" type="submit">Submit</button>
</form>

I read that this used to be an issue with the Chrome browser but should be fixed. I tried it in Firefox but kept getting the validation error. The for submits either way I just do not want to see the validation error when I don't enter a value and click Skip.

about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda