Skip to Content
avatar image
Former Member

Required Field

Hi

The <b>input field</b> element has a property <b>state</b> with a value <b>required</b>.

I supposed that this value <b>required</b> would activate some default input validation, in order to check if all required fields were really filled. But it doesn't.

I read tutorial 2 of webdynpro, and it describe the implementation of checkMandatory method...Is it really necessary? Isn't there a basic input validation?

[]

Ronaldo.

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

3 Answers

  • Best Answer
    avatar image
    Former Member
    Aug 18, 2004 at 01:28 PM

    Stefan, thank you for your answer.

    But I am still confused. If there is no implicit validation, why in the action definition there is a check "without validation".

    Would this automatic validation consider only formats, but not missing fields? Or this validation is only in the client??

    Regards,

    Ronaldo.

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi Ronaldo,

      implicit validation is done for some builtin types (for example you can't add an 'a' in an integer inputfield) and for simple types based on String you define with specific restrictions (min/max values, regular expressions and more).

      So, if you can specify a minimum length of 1 character for a simple type with base type String, the framework validates this for you. If you just use the string builtin type, this is not possible.

      Event handlers of non validating actions don't care at all about valid data, this makes it possible to clear an input form, cancel something or whatever.

      Got it now? 😉

      Regards

      Stefan

  • avatar image
    Former Member
    Aug 17, 2004 at 05:21 PM

    Hi Ronaldo,

    the simple answer is no, there is no default "missing value" validation if you mark an input field as required.

    This is just a property used for display and adds the required field mark (the red asterisk) to the labels of the corresponding input fields to tell the user that she/he has to enter something here.

    Regards

    Stefan

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Aug 19, 2004 at 01:19 PM

    Clear now. Thanks.

    Add comment
    10|10000 characters needed characters exceeded