Reputation: 209
I need validations for three different forms
1- not null validation
2- value entered must be between 1 and 100
3- and selected date can't be before 5/10/2000 dd/mm/yyy
Upvotes: 0
Views: 2788
Reputation: 416
Create new Validation with type PL/SQL Function (returning Error Text) with code:
if :P1_ITEM1 is null then return
'P1_ITEM1 is null' end if;
if :P1_ITEM2 not between 1 and 100 then return
'P1_ITEM2 not between' end if;
if to_date(:P1_ITEM3, 'DD/MM/YYYY') >= to_date('05/10/2000') then return
'P1_ITEM3 earlier than 05/10/2000' end if;
return null;
Additionally in Error Message type:
Unknown error.
Regards
Upvotes: 0
Reputation: 142713
Set its "minimum and maximum" allowed values in its properties. If you have to create a validation, then make it a function that returns a Boolean (or Error text), such as
return :P1_ITEM not between 1 and 100;
The same as #2 ...
return :P1_DATE_ITEM >= date '2000-10-05';
Upvotes: 1