Skip to content

Commit

Permalink
- reviewed @cfurrow lessthan-greaterthan validators PR
Browse files Browse the repository at this point in the history
  • Loading branch information
guillaumepotier committed Jan 22, 2013
1 parent 52197ff commit aafe7bb
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 77 deletions.
74 changes: 7 additions & 67 deletions documentation.html
Original file line number Diff line number Diff line change
Expand Up @@ -625,66 +625,6 @@ <h4>Basic constraints</h4>
</td>
</tr>

<!-- GreaterThan -->
<tr>
<td>Greater Than other Element</td>
<td>
<code>data-greaterthan="#otherElement"</code>
</td>
<td>
Validates that a given input has a value greater than the value of another input.
</td>
<td class="not-for-mobile">
<table>
<tr>
<td>
<small></small>
<form data-validate="parsley">
<input type="text" id="greaterthan" name="greaterthan" data-greaterthan="#greaterthan-min" value="1" />
<input type="text" name="greaterthan-min" id="greaterthan-min" value="1" />
</form>
</td>
<td>
<span class="btn btn-small" onclick="javascript:$('#greaterthan').parsley( 'validate' );">
<i class="icon-ok"></i>
</span>
</td>
</tr>
</table>
</td>

</tr>

<!-- LessThan -->
<tr>
<td>Less Than other Element</td>
<td>
<code>data-lessthan="#otherElement"</code>
</td>
<td>
Validates that a given input has a value less than the value of another input.
</td>
<td class="not-for-mobile">
<table>
<tr>
<td>
<small></small>
<form data-validate="parsley">
<input type="text" id="lessthan" name="lessthan" data-lessthan="#lessthan-max" value="2" />
<input type="text" name="lessthan-max" id="lessthan-max" value="1" />
</form>
</td>
<td>
<span class="btn btn-small" onclick="javascript:$('#lessthan').parsley( 'validate' );">
<i class="icon-ok"></i>
</span>
</td>
</tr>
</table>
</td>

</tr>

<!-- minChecked -->
<tr>
<td>Min check</td>
Expand Down Expand Up @@ -1203,29 +1143,29 @@ <h5>Here is the list of parsley.extra validators</h5>
</thead>
<tbody>
<tr>
<td>Data minwords</td>
<td>Min Words</td>
<td><code>data-minwords="6"</code></td>
<td>Validate that a field has at least 6 words.</td>
</tr>
<tr>
<td>Data maxwords</td>
<td>Max Words</td>
<td><code>data-maxwords="6"</code></td>
<td>Validate that a field has 6 words maximum.</td>
</tr>
<tr>
<td>Data rangewords</td>
<td>Range Words</td>
<td><code>data-rangewords="[6,10]"</code></td>
<td>Validate that a field has between 6 and 10 words.</td>
</tr>
<tr>
<td>Data greaterthan</td>
<td>Greater Than</td>
<td><code>data-greaterthan="#elem"</code></td>
<td>Validate that a field's value is greater than that of #elem's value.</td>
<td>Validate that a field's value is greater than #elem's value.</td>
</tr>
<tr>
<td>Data lessthan</td>
<td>Less Than</td>
<td><code>data-lessthan="#elem"</code></td>
<td>Validate that a field's value is less than that of #elem's value.</td>
<td>Validate that a field's value is lower than #elem's value.</td>
</tr>
</tbody>
</table>
Expand Down
20 changes: 10 additions & 10 deletions tests/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -160,32 +160,32 @@
switch ( location.hash ) {
case '#jquery':
jsAppend( jquery , pause( 50 ) );
jsAppend( '../parsley.js' );
jsAppend( '../parsley.extend.js' );
jsAppend( '../parsley.js' , pause( 50 ) );
jsAppend( '../parsley.extend.js' , pause( 50 ) );
document.getElementById( 'info' ).innerHTML = 'Parsley test suite for jQuery, unminified version';
break;
case '#zepto':
jsAppend( zepto , pause( 50 ) );
jsAppend( '../parsley.js' );
jsAppend( '../parsley.extend.js' );
jsAppend( '../parsley.js' , pause( 50 ) );
jsAppend( '../parsley.extend.js' , pause( 50 ) );
document.getElementById( 'info' ).innerHTML = 'Parsley test suite for Zepto, unminified version';
break;
case '#zepto-min':
jsAppend( zepto , pause( 50 ) );
jsAppend( '../dist/parsley.min.js' );
jsAppend( '../dist/parsley.extend.min.js' );
jsAppend( '../dist/parsley.min.js' , pause( 50 ) );
jsAppend( '../dist/parsley.extend.min.js' , pause( 50 ) );
document.getElementById( 'info' ).innerHTML = 'Parsley test suite for Zepto, minified version';
break;
case '#jquery-min':
jsAppend( jquery , pause( 50 ) );
jsAppend( '../dist/parsley.min.js' );
jsAppend( '../dist/parsley.extend.min.js' );
jsAppend( '../dist/parsley.min.js' , pause( 50 ) );
jsAppend( '../dist/parsley.extend.min.js' , pause( 50 ) );
document.getElementById( 'info' ).innerHTML = 'Parsley test suite for jQuery, minified version';
break;
case '#standalone':
default:
jsAppend( '../dist/parsley-standalone.min.js' );
jsAppend( '../dist/parsley.extend.min.js' );
jsAppend( '../dist/parsley-standalone.min.js' , pause( 50 ) );
jsAppend( '../dist/parsley.extend.min.js' , pause( 50 ) );
document.getElementById( 'info' ).innerHTML = 'Parsley test suite - Standalone Zepto Minified version';
break;
}
Expand Down

0 comments on commit aafe7bb

Please sign in to comment.