Home » Developer & Programmer » Application Express & MOD_PLSQL » I'm not sure how to get validations to do this... (apex 4.0.2)
I'm not sure how to get validations to do this... [message #538479] Fri, 06 January 2012 08:04 Go to next message
balckbandit5
Messages: 104
Registered: December 2011
Senior Member
Hello Smile

sorry I seem to be posting a lot on the forum these last few days...but i'm nust sure how to do this:
I need a validation to validate that ITEM_A follows these rules
- Starts with 'CH20'
- The 5th character is either A, V or G
- The last 5 are numbers
- It is 10 characters long

I've got the 10 characters long bit...its just the others...I'm not sure how to specify the 5th character...is that even possible?

thanks
Re: I'm not sure how to get validations to do this... [message #538492 is a reply to message #538479] Fri, 06 January 2012 09:56 Go to previous messageGo to next message
Littlefoot
Messages: 18834
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
By far the simplest way would be to use regular expression. So - create a validation whose type is "Regular expression" and let ITEM_A be validated by the following regular expression:
^CH20(A|V|G)[[:digit:]]{5}$
Re: I'm not sure how to get validations to do this... [message #538708 is a reply to message #538492] Mon, 09 January 2012 02:11 Go to previous message
balckbandit5
Messages: 104
Registered: December 2011
Senior Member
ahh perfect, thanks Smile
Previous Topic: Delete button on tabular form not working as it should
Next Topic: Interactive report/Master-Detail form problem
Goto Forum:
  


Current Time: Mon Apr 21 10:10:47 CDT 2014

Total time taken to generate the page: 0.13595 seconds