Open JonathanRufino opened 4 years ago
This function is not auto-generated. I think you should provide a getRawValue function to your settings parameter
Check Custom section on documentation:
/**
* getRawValue: (Function | optional | defaults return current masked value)
* use this function to parse and return values to use what you want.
* for example, if you want to create a phone number mask (999) 999-99-99 but want to get only
* the numbers for value, use this method for this parse step.
*/
getRawValue: function(value, settings) {
return 'my converted value';
},
on your case you can use something like:
const unmasked = MaskService.toRawValue('custom', masked, {
mask: '(99) 9 9999-9999'
getRawValue: (value, settings) {
return value.replace(/\D/g,'');
}
})
I'm facing issues when trying to remove custom masks.
Example:
If I try to use a default mask, like cpf, it works
Version