angular-selectize icon indicating copy to clipboard operation
angular-selectize copied to clipboard

isEmpty() doesn't support numeric model values

Open avaragado opened this issue 10 years ago • 1 comments

I have a selectize component with the required attribute set. This means isEmpty is called on validation to check whether the model has a value or not.

If the model value is numeric (eg set programmatically rather than by user selection), the isEmpty test fails as numbers don't have a length property.

avaragado avatar Oct 27 '15 12:10 avaragado

Yes, at long least, the lazy !val.length should be val.length === 0...

PhiLhoSoft avatar Mar 02 '16 10:03 PhiLhoSoft