Hello again…
I am trying to validate date input and i am having a few problems… I
have looked at the api and so far i see nothing wrong with my code…
Model:
#Validates Length
validates_length_of :part_number, :minimun => 5, :message => “Part#
must be at least 5 digits!”
validates_length_of :work_order, :minimun => 5, :message => “Work
Order must be at least 5 digits!”
validates_length_of :priority, :in => 1…3, :message => “Priority
must be between 1 and 3”
EX:
Part_number: 12345
Work_order: 12345
priority: 6
This comes back with an error: “private method `split’ called for
6:Fixnum”
6 is the value entered on the priority field…
When i comment the priority validation out, no matter what value i enter
on the part_number and work_order i get the field highlithed on red.
Even when the correct value is entered…
Model:
#Validates Length
validates_length_of :part_number, :minimun => 5, :message => “Part#
must be at least 5 digits!”
validates_length_of :work_order, :minimun => 5, :message => “Work
Order must be at least 5 digits!”
#validates_length_of :priority, :in => 1…3, :message => “Priority
must be between 1 and 3”
EX:
Part_number: 12345
Work_order: 12345
priority: 6
Am i missing something…?
Thanks