angular-selectize
angular-selectize copied to clipboard
isEmpty() doesn't support numeric model values
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.
Yes, at long least, the lazy !val.length should be val.length === 0...