I have a DB in which is a field called seconds. User needs to input a number of seconds, but obviously only in the range of 0-59. How can I control thisand prevent that a higher value is entered? Is this done by SQL query or by event? For either, what would the code to be used be?
You need to proceed to Visual Editor, open 'Edit as' properties of this field and set 'Validate as' to Regular expression. Try the following regular expression: ^[0-5]?[0-9]$ More info: http://www.regular-expressions.info/numericranges.html