nikestep / html-angular-validate

A HTML validator node module aimed at AngularJS projects
MIT License
14 stars 13 forks source link

add a deep copy of the validation options #4

Closed weshardee closed 9 years ago

weshardee commented 9 years ago

Since the validate function operates on arrays inside the options object, a deep copy is needed to ensure consistent behavior when the function is called with the same options object multiple times.

weshardee commented 9 years ago

My bad. That was sloppy of me. I've added a check to make sure opts is defined before doing the deep copy.