aurelia / validatejs

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

fix(dts): make key and descriptor optional #64

Closed searus closed 8 years ago

searus commented 8 years ago

The key and descriptor arguments on the decorator functions must be optional.

plwalters commented 8 years ago

@searus We can get this merged in - can you give me a brief explanation of what this fixes?

searus commented 8 years ago

When specifying a decorator without config, the tds is ok, e.g. For @required.

But when passing any config, if the key and descriptor are not optional there will be a compile error, e.g. For @numericality.

searus commented 8 years ago

@pwkad actually, I should update the pull request to make the config optional as well as the following syntax should also be valid: @required()

I'll do that when I get online (travelling again)

searus commented 8 years ago

@PWKad which of the decorators can be used with no config? I have the following:

plwalters commented 8 years ago

@searus I think so, I believe numericality also though but I would need to double check that again

plwalters commented 8 years ago

@searus Is this ready to merge in now?

searus commented 8 years ago

@PWKad I'm reviewing the rules now to make sure I have them all covered correctly

searus commented 8 years ago

@PWKad I've double checked and all the rules with optional config are now updated in the dts. This can now be merged. Do I need to manually copy this to the dts in the subfolders? Or is that part of a build?

plwalters commented 8 years ago

LGTM, it should update during the build process. So no need to update it manually.