Method: RiCal::PropertyValue::RecurrenceRule::Validations#validate
- Defined in:
- lib/ri_cal/property_value/recurrence_rule/validations.rb
#validate ⇒ Object
Used by #valid? to validate that the parameters of the reciever conform to RFC 2445 If errors are found they will be added to the receivers errors
Whenever any of the parameters are set, e.g. with:
recurrence_rule.count = 2
the errors will be reset
34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 |
# File 'lib/ri_cal/property_value/recurrence_rule/validations.rb', line 34 def validate @errors = [] validate_termination validate_freq validate_interval validate_int_by_list(:bysecond, (0..59)) validate_int_by_list(:byminute, (0..59)) validate_int_by_list(:byhour, (0..23)) validate_int_by_list(:bymonth, (1..12)) validate_bysetpos validate_byday_list validate_bymonthday_list validate_byyearday_list validate_byweekno_list validate_wkst end |