A value for XXX is required…

Problem

You get this error after entering data into a form in your application:

Please correct the following errors:

- A value for XXX is required.

Required data was not entered

This error occurs when a field is required and the user fails to enter a value into the web form.  Enter the data into the required field and click ‘OK’ or ‘Save’.

In some cases, a required field may not be visible on the web page.  Correct this design error by adding the field to the web page or by setting an initial value for the field so it always has a default value.

Your .NET Framework requires software patches

This error can occur when your .NET Framework 2.0 is out of date and requires software patch updates.  Older versions of the .NET Framework cause the onClick event to incorrectly trigger form validation.  Use the Microsoft Windows Update feature to select and apply all software patches for your .NET Framework.

You are using FCKEditor and have the ‘Required’ field property enabled

If you use a third-party control like FCKEditor for a field that that requires validation (‘Required’ checkbox on the ‘Display’ tab of the Page Properties dialog is checked) you will get this warning from your browser when saving the page, even though the input field is not empty.  This happens because the Microsoft asp:RequiredFieldValidator tag can’t properly operate with non-asp controls like FCKEditor.

To correct this, either change the generated control type to ASP Multi-line (or any other ASP control) if you need to validate this input field or uncheck the ‘Required’ checkbox if you prefer to use the Rich Text Editor rather than validate the input field value.

See Also

Part VII:  Troubleshooting Applications

Application Won’t Run

Application Runs But No Data is Displayed

Application Error Messages