Created
August 5, 2014 13:52
-
-
Save alber70g/dd353fc763fbfda870d5 to your computer and use it in GitHub Desktop.
ui-validate example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<input id="itemcodeSupplier" type="text" name="artikelcodeLeverancier" placeholder="Binnen gekozen productklasse (bijv. code 1; code2)" | |
ng-disabled="!Filters.SelectedProductClassId" ng-model="FiltersText.SelectedItemCodeSuppliers" | |
ng-list=";" ui-validate="{maxLength : 'maxLengthValidator($value, 35)' }" /> | |
<span style="color: red" ng-show="selectie.artikelcodeLeverancier.$error.maxLength"> | |
<script> | |
var maxLengthValidator = function ($value, 35){ | |
return $value.length <= 35; | |
} | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment