List:General Discussion« Previous MessageNext Message »
From:Mogens Melander Date:May 3 2007 12:16pm
Subject:Re: Enforcing Data Format
View as plain text  
On Thu, May 3, 2007 12:56, Tim Milstead wrote:
> Hello,
> Is it possible to enforce data formatting in fields using something like
> a regular expression?
> varchar is great but does not stop someone putting in the wrong
> reference number.
> I suspect the answer is no, you have to do it at a higher level. What
> aprroach would people suggest?
> Perhaps another table with two fields - field_name and field_regex?

And, what would you have mysql do if a user failed to enter fx. valid date ?

Maybe you'd be better off, handling input validation in the user-interface.


Mogens Melander
+45 40 85 71 38
+66 870 133 224

This message has been scanned for viruses and
dangerous content by OpenProtect(, and is
believed to be clean.

Enforcing Data FormatTim Milstead3 May
  • Re: Enforcing Data FormatBaron Schwartz3 May
  • Re: Enforcing Data FormatMartijn Tonies3 May
    • RE: Enforcing Data FormatEdward Kay3 May
      • Re: Enforcing Data FormatMartijn Tonies3 May
  • Re: Enforcing Data FormatMogens Melander3 May
    • Re: Enforcing Data FormatStephen Cook3 May
  • Re: Enforcing Data FormatMartijn Tonies3 May
Re: Enforcing Data FormatB. Keith Murphy3 May