How do you restrict a field to contain alphanumeric characters only?
2004-08-01 21:20
656 查看
This is an example of code that uses regular expressions to limit a field's entry. Put this in a field's Input Validation formula:
@If( @Matches(Serial_Num; "+{0-9}"); @Success;
@Matches(Serial_Num; "+{a-zA-Z}"); @Success;
@Do(@Prompt([OK];
"Invalid Serial Number";
"The Unit Serial Number contains an illegal character, probably a carriage return. Please remove the illegal character and save again.");
@Return("")) )
相关文章推荐
- 【转】How To Find What You Love To Do
- hdu 4723 How Long Do You Have to Draw(贪心)
- How do you copy the contents of an array to a std::vector in C++ without looping? (From stack over flow)
- How do you define a copy constructor or assignment operator for a class that contains a pointer to a (abstract) base class?
- Work with Passion: How to Do What You Love for a Living
- 修改ListItem时出现Error: Invalid data has been used to update the list item. The field you are trying to update may be read only.
- How to resolve: You do not have a license to use this ActiveX control
- HDU 4723 How Long Do You Have to Draw
- From a response document, how do you update a field in the parent document?
- How do you link a C++ program to C functions?
- How do you remove the duplicate characters in a given string without using any additional buffer.
- Cannot connect to WMI provider.You do not have permission or the server is unreachable.Note that you can only manager SQL Server 2005 and later version with SQL Server Configuration Manager.Invalid namespace [0x8004100e]
- what would you do if you had only one day left to live?
- How do you force a java swt program to “move itself to the foreground”?
- How do you explain Machine Learning and Data Mining to non Computer Science people?
- In C how do you redirect stdin/stdout/stderr to files when making an execvp() or similar call?
- How do I set the timeout for a JAX-WS webservice client? if you want to set timeouts for specific se
- How To Find What You Love To Do
- hdu4723 How Long Do You Have to Draw 贪心
- How do you explain Artifical Neural Network to a college student ?