Regular Expressions

validates_format_of :r_or_s, :with => ^(r|s)$, :on => :create

Why doesn't that work? Where is a reference who shows me how to use
regular expressions???

You could try:

validates_format_of :r_or_s, :with => /^(r|s)$/, :on => :create

For reference checkout http://www.regular-expressions.info/ or the more in
depth O'Reilly book "Mastering Regular Expressions, Powerful Techniques
for Perl and Other Tools".