1. bundle open activemodel
2. Open the validator.rb file.
3. You can see the comments that shows you how to mixin the validators. Once you mixin, you can add any validator and define a dummy method for the attribute to play with it in the irb:
SSN_REGEX = /your ssn regex goes here/
validates_format_of :ssn, with: SSN_REGEX
4. Change the ssn method to invalid ssn to test your regex.