|
|
@@ -202,14 +202,13 @@ $(document).ready(function(){
|
|
|
```
|
|
|
|
|
|
### Optional Masks
|
|
|
-When `clearIncomplete: true` is set in the options, the mask will treat masks marked option as separate from those that are not optional.
|
|
|
+
|
|
|
+When `clearMaskOnLostFocus: true` is set in the options (default), the mask will always clearout masks marked as optional when not filled in.
|
|
|
|
|
|
For example, given:
|
|
|
|
|
|
```javascript
|
|
|
-$('#test').inputmask('999[-AAA]',{
|
|
|
- clearIncomplete: true
|
|
|
-});
|
|
|
+$('#test').inputmask('999[-AAA]');
|
|
|
```
|
|
|
While the field has focus and is blank, users will see the full mask `___-___`.
|
|
|
When the required part of the mask is filled and the field loses focus, the user will see `123`.
|
|
|
@@ -223,6 +222,15 @@ $(document).ready(function(){
|
|
|
});
|
|
|
```
|
|
|
|
|
|
+
|
|
|
+### oncleared option
|
|
|
+
|
|
|
+```javascript
|
|
|
+$(document).ready(function(){
|
|
|
+ $("#ssn").inputmask("999-99-9999",{placeholder:" ", oncleared: function(){ alert('Set focus somewhere else ;-)');} });
|
|
|
+});
|
|
|
+```
|
|
|
+
|
|
|
### aliases option
|
|
|
|
|
|
First you have to create an alias definition (more examples can be found in jquery.inputmask.extentions.js)
|