# File lib/stringvalidator.rb, line 305 def valid?(rule, str) begin validate(rule, str) rescue Error return false end return true end