Peculiar validation error: undefined local variable or method 'fieldWithErrors'

Hello all,

I’m submitting a form with the following field -

<%= p.text_field :postcode, {:class => ‘inputMedium’} %>

and on submitting the form I am getting this error -

NameError in Property#create

Showing app/views/property/sell.rhtml where line #52 raised:

undefined local variable or method `fieldWithErrors’ for #Object:0x1de968

Extracted source (around line #52):

49:

50:

51: Postcode

52: <%= p.text_field :postcode, {:class => ‘inputMedium’} %>

53:

54:

55:

However, if I remove the {:class => ‘inputMedium’} option, the form processes fine. This occurs when I have validates_presence_of :postcode

Any ideas??

Many thanks in advance,

Alastair

I've still not managed to fix this error and it's occurring elsewhere in my project. Does anyone have any suggestions on what the problem might be? It seems like removing {:class => '...'} options fixes this error, which is not an ideal situation!

Many thanks,

Alastair