best way to mask attribute values

Hello,

I am currently using helpers to format the display of attributes, but I
would like to control the format of the attribute values when
populating a text field and also when the model instances are populated
from params once the user submits.

I've been fooling around with overriding attributes in the model, but
either I am missing something or heading down the wrong path.

Any guidance would be greatly appreciated.

Thanks,
Dan

By 'mask' are you talking about format restrictions ?

Like that phone number field must be xxx-xxx-xxxx ?

Yes, exactly. I am using helpers for display only. I am struggling
with populating text fields with the display format and not the
database format.