I want to extend the provided cxreditcard method to count a sequence of * characters followed by 4 digits as a valid value. I need this for a form where the credit card can be populated from a previously saved value. Naturally we don't want to display the full number for security reasons but we need for the user to be able to see the last four digits.
My idea was to write a new ccard method that calls the pre-existing creditcard method. If that method returns true then return true. If it returns false then check the field value against a regex /\*+[0-9] {4,4}/. How can I write a custom method that makes use of a built in method?