<input>: "required" is not set, yet the completion is required

Asked

Viewed 53 times

-3

I have an input type url within a form, and I have not set the "required" attribute of it, and even then field completion is being required. I also tried: required="false" and required=false, and did not help...

  <form method="dialog" id="form-cad-noticia" action="cadastrarNoticia">
        <input type="url" name="urlNoticia" placeholder="Insira aqui o link..." > <!--Aqui é o problema-->
        <input type="submit" value="CONFIRMAR">
    </form>

At least that’s what’s happening in my application. Any ideas?

  • 1

    Apparently, it is not required to fill in, so that running your code does not show the message. Maybe there is some JS in your application that is doing this treatment?

  • 1

    What happens there is that this guy url await the signal of : even without the attribute required in the field, it looks like the guy email for example, if you do not insert a @ is shown the browser message saying that is missing the signal.

  • Can you explain method="dialog" ? I think it will work being POST or GET.

  • There is no problem there, if you put a valid URL in the field works normal, as if you do not put anything in the tb input works

  • @hugocsl doesn’t work. And there’s no javascript changing it

1 answer

0


I restarted everything and it worked, without moving anything

Browser other questions tagged

You are not signed in. Login or sign up in order to post.