How to validate record type as function input in PL/SQL
<p>I am using Oracle 11g in Windows environment. I am not a thorough PL/SQL Developer. My situation is like this.</p>

<p>I am using a package, need to validate the logging in user. Not checking table column directly to do this. </p>

<pre><code>create or replace package Configuration_pkg as

   TYPE user_rec IS RECORD
   (email     VARCHAR2(120),
    password  VARCHAR2(120)); 
  TYPE user_tab IS TABLE OF user_rec INDEX BY BINARY_INTEGER;

  function Validate_logged_user (p_user_tab IN user_tab) RETURN VARCHAR2;
end Configuration_pkg;

create or replace package body Configuration_pkg as

  function Validate_logged_user (p_user_tab IN user_tab) RETURN VARCHAR2 IS
  Ismatching number;
begin
  select count(1)
    into Ismatching
    from CG_M_USERS
    where username = user_tab.email
    and password = user_tab.password;

  if Ismatching = 0 then
    return 'Invalid username / password';
  elsif Ismatching = 1 then
    return 'Login successful';
  end if;

end Validate_logged_user;

end Configuration_pkg;
</code></pre>

<p>I am getting the following error</p>

<pre><code>Error(10,20): PL/SQL: ORA-00904: "USER_TAB"."PASSWORD": invalid identifier
Error(10,29): PLS-00302: component 'PASSWORD' must be declared
</code></pre>

<p>I want to validate the user with the value passed with the record type, not directly checking username and password from table. Everyone's help is highly appreciated.</p>