aurelia / validatejs

Enables expressive validation using decorators and/or a fluent API.
MIT License
22 stars 23 forks source link

@required decorator does appear to work #54

Closed mttmccb closed 8 years ago

mttmccb commented 8 years ago

I've tried clear the text field, not setting it in the model in the first place but I never received a warning about a required field. Am I missing something obvious?

plwalters commented 8 years ago

If the property doesn't exist validatejs thinks it was an error on your part I believe and reports out nothing.

mttmccb commented 8 years ago

But it does exist, it's in the model I'm using.

The fluent syntax worked with the same model but the decorator didn't.

mttmccb commented 8 years ago

I'll try with a gist.run and post it here if it breaks or not

plwalters commented 8 years ago

Throw together a repro and we can look at it

mttmccb commented 8 years ago

I've downloaded the latest (webpack ES2016) skeleton and added the bits needed for aurelia-validatejs and copied in the views from the sample folder in this aurelia-validatejs-decorators repo.

@required doesn't seem to work but the fluent one does.

plwalters commented 8 years ago

Sounds correct as you mentioned the other is a duplicate sorry I missed this earlier

jdanyow commented 8 years ago

this is fixed in the latest build