diff --git a/README.md b/README.md index 8561a21f..600359ef 100644 --- a/README.md +++ b/README.md @@ -2,13 +2,59 @@ [![Join the chat at https://gitter.im/aurelia/validation](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/aurelia/validation?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) -A validation plugin for Aurelia. +A validation plugin for [Aurelia](http://aurelia.io) that uses a fluent API. + +``` javascript +this.validation = validation.on(this) + .ensure('awesomeLevel') + .min(9000) + .ensure('readMe') + .notEmpty() + .minLength(5) + .ensure('usage') + .equals('simple'); +``` > To keep up to date on [Aurelia](http://www.aurelia.io/), please visit and subscribe to [the official blog](http://blog.durandal.io/). If you have questions, we invite you to join us on [our Gitter Channel](https://gitter.im/aurelia/discuss). +##Documentation +- [Installing the plugin](https://github.com/aurelia/validation/blob/master/doc/Intro.md#installation) +- [Getting started](https://github.com/aurelia/validation/blob/master/doc/Intro.md#getting-started) +- [Validation types](https://github.com/aurelia/validation/blob/master/doc/Intro.md#validation-types) + - [notEmpty()](https://github.com/aurelia/validation/blob/master/doc/Intro.md#notempty) + - [between(minimumValue, maximumValue)](https://github.com/aurelia/validation/blob/master/doc/Intro.md#betweenminimumvalue-maximumvalue) + - [betweenLength(minimumLength, maximumLength)](https://github.com/aurelia/validation/blob/master/doc/Intro.md#betweenlengthminimumlength-maximumlength) + - [email()](https://github.com/aurelia/validation/blob/master/doc/Intro.md#email) + - [equals(otherValue, otherValueLabel)](https://github.com/aurelia/validation/blob/master/doc/Intro.md#equalsothervalue-othervaluelabel) + - [in(collection)](https://github.com/aurelia/validation/blob/master/doc/Intro.md#incollection) + - [isAlphanumeric()](https://github.com/aurelia/validation/blob/master/doc/Intro.md#isalphanumeric) + - [isAlphanumericOrWhitespace()](https://github.com/aurelia/validation/blob/master/doc/Intro.md#isalphanumericorwhitespace) + - [isDigit()](https://github.com/aurelia/validation/blob/master/doc/Intro.md#isdigit) + - [isStrongPassword(minimumComplexityLevel)](https://github.com/aurelia/validation/blob/master/doc/Intro.md#isstrongpasswordminimumcomplexitylevel) + - [isNumeric()](https://github.com/aurelia/validation/blob/master/doc/Intro.md#isnumeric) + - [minLength(minimumLength)](https://github.com/aurelia/validation/blob/master/doc/Intro.md#minlengthminimumlength) + - [minimum(minimumValue)](https://github.com/aurelia/validation/blob/master/doc/Intro.md#minimumminimumvalue) + - [matches(regex)](https://github.com/aurelia/validation/blob/master/doc/Intro.md#matchesregex) + - [matchesRegex(regexString)](https://github.com/aurelia/validation/blob/master/doc/Intro.md#matchesregexregexstring) + - [maxLength(maximumLength)](https://github.com/aurelia/validation/blob/master/doc/Intro.md#maxlengthmaximumlength) + - [maximum(maximumValue)](https://github.com/aurelia/validation/blob/master/doc/Intro.md#maximummaximumvalue) + - [notEquals(otherValue, otherValueLabel)](https://github.com/aurelia/validation/blob/master/doc/Intro.md#notequalsothervalue-othervaluelabel) + - [passes(customFunction, threshold)](https://github.com/aurelia/validation/blob/master/doc/Intro.md#passescustomfunction-threshold) + - [passesRule(validationRule)](https://github.com/aurelia/validation/blob/master/doc/Intro.md#passesrulevalidationrule) + - [withMessage(message)](https://github.com/aurelia/validation/blob/master/doc/Intro.md#withmessagemessage) +- [Logical Operators](https://github.com/aurelia/validation/blob/master/doc/Intro.md#logical-operators) + - [if(conditionalExpression)](https://github.com/aurelia/validation/blob/master/doc/Intro.md#ifconditionalexpression) + - [switch(conditionalExpression)](https://github.com/aurelia/validation/blob/master/doc/Intro.md#switchconditionalexpression) +- [I18N](https://github.com/aurelia/validation/blob/master/doc/Intro.md#i18n) +- [Custom Validation](https://github.com/aurelia/validation/blob/master/doc/Intro.md#custom-validation) +- [Customizing visualization](https://github.com/aurelia/validation/blob/master/doc/Intro.md#customizing-the-visualization) +- [ValidationResult](https://github.com/aurelia/validation/blob/master/doc/Intro.md#validationresult) + ## Dependencies -This library has **NO** external dependencies. + +* [aurelia-binding](https://github.com/aurelia/binding) +* [aurelia-templating](https://github.com/aurelia/templating) ## Used By