Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

angular-ui-validate

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

angular-ui-validate

AngularUI ui-validate

  • 1.0.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
9.1K
increased by8.2%
Maintainers
1
Weekly downloads
 
Created
Source

AngularUI ui-validate

General-purpose validator for ngModel. angular.js comes with several built-in validation mechanism for input fields (ngRequired, ngPattern etc.) but using an arbitrary validation function requires creation of a custom formatters and / or parsers. The ui-validate directive makes it easy to use any function(s) defined in scope as a validator function(s). A validator function will trigger validation on both model and input changes.

@example <input ui-validate=" 'myValidatorFunction($value)' "> @example <input ui-validate="{ foo : '$value > anotherModel', bar : 'validateFoo($value)' }"> @example <input ui-validate="{ foo : '$value > anotherModel' }" ui-validate-watch=" 'anotherModel' "> @example <input ui-validate="{ foo : '$value > anotherModel', bar : 'validateFoo($value)' }" ui-validate-watch=" { foo : 'anotherModel' } ">

@param ui-validate {string|object literal} If strings is passed it should be a scope's function to be used as a validator. If an object literal is passed a key denotes a validation error key while a value should be a validator function. In both cases validator function should take a value to validate as its argument and should return true/false indicating a validation result.

Keywords

FAQs

Package last updated on 04 Jun 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc