1

I have a class MyField that extends FormField (it is a custom Form Field I can add via Form Builder). I have one field in the .ascx file:

<telerik:TextField ID="Status" CssClass="sfTxtID" style="visibility:hidden;" runat="server">
</telerik:TextField>

Currently, if the user presses the Submit button the form submits even though the Status TextField is empty.

My question is: How can I validate my field when the submit button is pressed and show an error if its not filled out?

mishmash
  • 4,422
  • 3
  • 34
  • 56
  • Is this in the frontend or the backend? – Modika Jan 15 '13 at 17:40
  • Did you find an answer to this? I have a problem with the Forms control in that it doesn't allow Radio Button Lists to be validated (especially when you select the option to not select any options by default) – Jacques Jan 16 '13 at 07:55
  • I didn't get an answer yet but I will hopefully get one soon. I'll answer the question if I get the answer. – mishmash Jan 16 '13 at 08:04
  • This is going to sound really silly, but have you tried just a general validator controls? http://msdn.microsoft.com/en-us/library/debza5t0(v=vs.100).aspx – Modika Jan 16 '13 at 10:23

1 Answers1

0

Hidden controls do not get checked by validation. Microsoft

Jon R.
  • 977
  • 6
  • 12
  • A bit more explanation of the problem and the reason you say it is not going to be checked by validation would be helpful instead of just a reference to the link. – Tuxdude Mar 08 '13 at 20:22