I'm building a customer feedback form where upon submission a voucher is sent via SMS text message. I'm using the YiiMail extension to handle sending the text message. It's all working well.
My only issue arrises when the applicant breaks up their mobile number with spaces when inputting it, as this doesn't validate in Swift mailer.
What is the best approach? Do I need to create a new validation rule or does Yii provide one for this scenario? Or would you recommend creating a function to strip the spaces out after validation? If that's the case, how would I go about implementing this (I still struggle with where to place this kind of functionality - I'm pretty new to OOPHP).
Would appreciate the help!