CodeIgniter Forums
Validation: Formatting Fields - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: Validation: Formatting Fields (/showthread.php?tid=2807)



Validation: Formatting Fields - El Forum - 08-25-2007

[eluser]BrandonDurham[/eluser]
I have a "Daytime Phone" field in my form that I'm validating for length and content regardless of how they enter it. The function I'm using also formats the string to be "(555) 555-5555". I'd like to be able to update that form field with the formatted version once it's been checked. How might I do that?

Thanks!


Validation: Formatting Fields - El Forum - 08-25-2007

[eluser]BrandonDurham[/eluser]
Well hell.
Code:
$_POST['daytime_phone'] = $tmp;
worked fine.