Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Added Jam Install #41

Merged
merged 5 commits into from

2 participants

@jrf0110

Hope you don't mind, but I added amanda to the jam repo :)
http://groundcomputing.co.uk/code/jam/packages/#/details/amanda

It automatically set me up as the owner since I added it, but if you want to maintain the jam stuff, I can transfer the ownership.

@jrf0110

Fixed some grammatical errors in reporting so it now pluralizes 'characters' when it needs to and uses 'a' or 'an' when it needs to.

@Baggz
Owner

Thanks! Merged.

@Baggz Baggz merged commit 5cdf75a into Baggz:master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Jun 21, 2012
  1. @jrf0110

    fixed typo - the 'u' in universal in this case is not a vowel as it m…

    jrf0110 authored
    …akes the 'you' sound, therefore it should be preceded by 'a' not 'an'
  2. @jrf0110

    newline at the end

    jrf0110 authored
  3. @jrf0110

    added jam install

    jrf0110 authored
  4. @jrf0110

    stupid typo

    jrf0110 authored
Commits on Jul 16, 2012
  1. @jrf0110
This page is out of date. Refresh to see the latest.
Showing with 15 additions and 7 deletions.
  1. +9 −2 README.md
  2. +6 −5 src/engines/json/errorMessages.js
View
11 README.md
@@ -1,7 +1,7 @@
<a name="amanda"></a>
# Amanda
-[Amanda](https://github.com/Baggz/Amanda) is aiming to be **an universal validation library**. Currently it supports only the [JSON Schema Internet Draft](http://tools.ietf.org/html/draft-zyp-json-schema-03), but I'm planning to add [Orderly](http://orderly-json.org/), [Relax NG](http://relaxng.org/) and others very soon.
+[Amanda](https://github.com/Baggz/Amanda) is aiming to be **a universal validation library**. Currently it supports only the [JSON Schema Internet Draft](http://tools.ietf.org/html/draft-zyp-json-schema-03), but I'm planning to add [Orderly](http://orderly-json.org/), [Relax NG](http://relaxng.org/) and others very soon.
<a name="example"></a>
#### Example
@@ -82,6 +82,12 @@ To install **Amanda**, use [NPM](http://npmjs.org/).
$ npm install amanda
```
+Or use use [JAM](http://groundcomputing.co.uk/code/jam).
+
+```
+$ jam install amanda
+```
+
Releases for a browser are available for download from GitHub.
| **Version** | **Description** | **Size** | **Action** |
@@ -205,4 +211,5 @@ Permission is hereby granted, free of charge, to any person obtaining a copy of
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
-THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
View
11 src/engines/json/errorMessages.js
@@ -2,7 +2,8 @@
* Messages
* --------------------
*/
-var errorMessages = {
+var vowels = "aeiou",
+errorMessages = {
/**
* Maximum
@@ -38,7 +39,7 @@ var errorMessages = {
*/
maxLength: function(property, propertyValue, attributeValue) {
return [
- 'The ' + property + ' property must not exceed ' + attributeValue + ' characters.',
+ 'The ' + property + ' property must not exceed ' + attributeValue + ' character' + (attributeValue > 1 ? 's' : '') + '.',
'The length of the property is ' + propertyValue.length + '.'
].join(' ');
},
@@ -52,7 +53,7 @@ var errorMessages = {
*/
length: function(property, propertyValue, attributeValue) {
return [
- 'The ' + property + ' property must be exactly ' + attributeValue + ' characters.',
+ 'The ' + property + ' property must be exactly ' + attributeValue + ' character' + (attributeValue > 1 ? 's' : '') + '.',
'The length of the property is ' + propertyValue.length + '.'
].join(' ');
},
@@ -80,7 +81,7 @@ var errorMessages = {
*/
type: function(property, propertyValue, attributeValue) {
return [
- 'The ‘' + property + '’ property must be a/an' + attributeValue + '’.',
+ 'The ‘' + property + '’ property must be ' + (vowels.indexOf(attributeValue[0]) > -1 ? 'an' : 'a') + '' + attributeValue + '’.',
'The type of the property is ‘' + detectType(propertyValue) + ''
].join(' ');
},
@@ -142,7 +143,7 @@ var errorMessages = {
* @param {any} propertyValue
* @param {string} attributeValue
*/
- maxItems: function(property, propertyValue, attributeValue) {
+ maxItems: function(property, propertyValue, attributeValue) {
return [
'The ‘' + property + '’ property must not contain more than ‘' + attributeValue + '’ items.',
'Currently it contains ‘' + propertyValue.items + '’ items.'
Something went wrong with that request. Please try again.