Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
janvanderhaegen committed May 30, 2015
2 parents 393613f + ea5cd7f commit 2bccd6b
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ Watch the [live samples](http://aurelia.io/validation/). (Work-in-progress)
- [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)
- [isNotEmpty()](https://github.com/aurelia/validation/blob/master/doc/Intro.md#notempty)
- [containsNoSpaces()](https://github.com/aurelia/validation/blob/master/doc/Intro.md#containsnospaces)
- [containsOnly(regex)](https://github.com/aurelia/validation/blob/master/doc/Intro.md#containsonlyregex)
- [containsOnlyAlpha()](https://github.com/aurelia/validation/blob/master/doc/Intro.md#containsonlyalpha)
- [containsOnlyAlphaOrWhitespace()](https://github.com/aurelia/validation/blob/master/doc/Intro.md#containsonlyalphaorwhitespace)
Expand All @@ -46,6 +47,7 @@ Watch the [live samples](http://aurelia.io/validation/). (Work-in-progress)
- [isIn(collection)](https://github.com/aurelia/validation/blob/master/doc/Intro.md#isincollection)
- [isNumber()](https://github.com/aurelia/validation/blob/master/doc/Intro.md#isnumber)
- [isStrongPassword(minimumComplexityLevel)](https://github.com/aurelia/validation/blob/master/doc/Intro.md#isstrongpasswordminimumcomplexitylevel)
- [isURL()](https://github.com/aurelia/validation/blob/master/doc/Intro.md#isurl)
- [isNotEqualTo(otherValue, otherValueLabel)](https://github.com/aurelia/validation/blob/master/doc/Intro.md#isnotequaltoothervalue-othervaluelabel)
- [matches(regex)](https://github.com/aurelia/validation/blob/master/doc/Intro.md#matchesregex)
- [passes(customFunction, threshold)](https://github.com/aurelia/validation/blob/master/doc/Intro.md#passescustomfunction-threshold)
Expand Down
7 changes: 7 additions & 0 deletions doc/Intro.md
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,9 @@ This is a special case, dictating that the field is 'required' and cannot be emp
Empty means null, undefined, '', or if it has a length property (arrays and strings) that the length is 0.
>The isNotEmpty rule is always checked first before any other validation rule. This means that without the isNotEmpty rule, the .hasMinLength(5) rule would still consider a value of '' as valid because the field is allowed to be empty.
####containsNoSpaces()
Validates that the value entered contains no whitespaces.

####containsOnly(regex)
Validates that value entered tests true for the given *regex*.
> Note: for now this is a synonymn for *matches(regegx)*, however in the future we will try to add the possibility to prevent invalid input for any of the *containsOnly* validation rules.
Expand Down Expand Up @@ -230,6 +233,10 @@ This matches the number of groups (lowercase/uppercase/digits/special characters
Validates that the value entered is not stritly equal to the *otherValue*.
Optionally takes an *otherValueLabel*, which will be used in the error message.
Arguments can be values or functions that return a value. See 'config.computedFrom'.

####isURL()
Validates that the value entered is a valid URL.
Supports web addresses, 'localhost', IP4 and IP6 addresses. Supports query parameters. Supports no protocol, ftp, http or https.

####matches(regex)
Validates that the value entered is valid according to the provided *regex* (RegExp).
Expand Down
2 changes: 1 addition & 1 deletion src/resources/nl-NL.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ export let data = {
return `moet op zijn minst ${Utilities.getValue(threshold)} tekens lang zijn`;
},
'MinimumValueValidationRule': (newValue, threshold) => {
return `moet op meer dan ${Utilities.getValue(threshold)} zijn`;
return `moet meer dan ${Utilities.getValue(threshold)} zijn`;
},
'MaximumInclusiveValueValidationRule' : (newValue, threshold) => {
return `moet op zijn meest ${Utilities.getValue(threshold)} zijn`;
Expand Down

0 comments on commit 2bccd6b

Please sign in to comment.