cancel
Showing results for 
Search instead for 
Did you mean: 

Required Field

Former Member
0 Kudos

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.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

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.

Former Member
0 Kudos

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

Answers (2)

Answers (2)

Former Member
0 Kudos

Clear now. Thanks.

Former Member
0 Kudos

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