0

I want to use a validation plugin that is able to validate input with the form attribute outside of a form. JQuery validation plugin does not seem to support this, so I was wondering if anyone else knows one that does support this functionality.

Code example:

<form id="form"></form> 
<input name="someInput" type="text" form="form">
Tibout
  • 23
  • 1
  • 9

1 Answers1

0

You could try this way:

var someInputValue= $("input[name='someInput']").val();
// TODO validation
// e.g. someInputValue == ''
mmuzahid
  • 2,252
  • 23
  • 42
  • I know I can do it manually, but it would just be fairly time consuming considering I have a bunch of different input fields / types, of which most have different validation requirements. With a plugin like JQuery Validation you can do most of it relatively quickly! Thanks for the suggestion though, I might just have to do it like this! – Tibout Feb 19 '17 at 02:12