Hi PAVB,
I put in the the single quote around the password (maroon font below), ran teh function again, then tested out. The outcome no matter what I put in all lower case or one upper case, it error me out. The error below.

Hi Hrishy,
I will try your way to see if it work.


Hi PAVB and Hrishy,
I truthly to thank you so much for making effort and providing me recommendation of the code to test out.

==============
SQL> CREATE OR REPLACE FUNCTION trina_verify_function
2 (username varchar2,
3 password varchar2,
4 old_password varchar2)
5 RETURN boolean IS
6 n boolean;
7 m integer;
8 differ integer;
9 isdigit boolean;
10 ischar boolean;
11 ispunct boolean;
12 isupper boolean;
13 digitarray varchar2(20);
14 punctarray varchar2(25);
15 chararray varchar2(52);
16 regular_expr varchar2(50);
17
18 BEGIN
19 digitarray:= '0123456789';
20 chararray:= 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
21 punctarray:='!"#$%&()``*+,-/:;<=>?_';
22 regular_expr:= '[ABCDEFGHIJKLMNOPQRSTUVWXYZ]';
23 m := length(password);
24
25 if regexp_instr('password',regular_expr) < 1 THEN 26 raise_application_error(-20006, 'Password must contain at least one upper case letter.');
27 end if;
28
29 -- if everything is fine retrun true.
30 RETURN(true);
31 END;
32 /

Function created.

SQL>
SQL> alter user trina identified by trina_55555555555;
alter user trina identified by trina_55555555555
*
ERROR at line 1:
ORA-28003: password verification for the specified password failed
ORA-20006: Password must contain at least one upper case letter.


SQL> alter user trina identified by trina_A5555555555;
alter user trina identified by trina_A5555555555
*
ERROR at line 1:
ORA-28003: password verification for the specified password failed
ORA-20006: Password must contain at least one upper case letter.