KO
|
EN
gitlite — search
Search
#javascript
#python
#hacktoberfest
#react
#ai
#typescript
#llm
#go
#golang
#android
#machine-learning
#rust
#deep-learning
#linux
angular-object-validator
★ 9
Open GitHub ↗
AngularJS Object Validator
Download README (.md)
Explore Similar Repositories
celox-inpes
:
A Luxe Engine learning project
flask-sqlalchemy-booster
:
Collection of utilities and decorators which add extensive querying and serializing capabilities to Flask SQLalchemy models
HRR
:
Hillslope River Routing
activitystreams-testing
:
W3C Activity Streams 2.0 Conformance Tests
shades-of-teal
:
A colorscheme for vim
// repository documentation
Was this content helpful?
★ 0
(0 ratings)
Select Rating:
★
★
★
★
★
Submit Feedback
Recent Feedback
×
Download README
Do you want to download the
README.md
file for
angular-object-validator
?
Download (.md)
## AngularJS Object Validator AngularJS object validator. This is the initial implementation however, I'll be working further to improve functionality and abilities as well as observing nested objects. Better documentation will also be introduced in the near future. [](https://travis-ci.org/iamcutler/angular-object-validator) [](https://coveralls.io/r/iamcutler/angular-object-validator) ## Installation ```npm install angular-object-validator ``` ## Allowed validations: * required ### Data types: * number * array * string * object * boolean ### Calculations: * min * max * greaterThan * lessThan * greaterThanOrEquals * lessThanOrEquals ## Example usage: You can pass a single object or an array of objects to be validated. app.controller('AppCtrl', function(ObjectValidator) { // Set validation rules. var rules = [ { "quantity": [ { 'required': 'Quantity received must be present' }, { '{lessThanOrEquals:quantityOrdered}': 'Quantity received must be less than or equal to quantity ordered' } ] } ]; ObjectValidator.validate([{}, {}, {}], rules).then(function() { // Validation passed }).catch(function(errors) { // Errors are returned as an array }); });