0

I'm using HappyJS for form validation, but can't seem to make it work.

I have some coffeescript like:

jQuery ->
  $(document).ready ->
    $("#new_store").isHappy fields:
        "#store_name":
          required: true
          message: "There really needs to be a name here"

and some html like:

<form id='new_store'>
   <input id="store_name" type="text" />
</form>

Here's a JSFiddle

infinity
  • 719
  • 2
  • 11
  • 23

1 Answers1

1

Try this updated fiddle, it works for me.

$("#new_store").isHappy fields:
  "#store_name":
    required: true
    message: "There really needs to be a name here"

The problem with your fiddle seems to be that you're using the raw GitHub URL to hotlink the HappyJS file. Use RawGit instead. Also, see this answer.

Community
  • 1
  • 1
Attila O.
  • 15,659
  • 11
  • 54
  • 84