Ignore white spaces for comparison in unique constraints of Oracle
You can't do this with a unique constraint but you can do this with a unique index:

create unique index ix_name 
   on the_table(regexp_replace(the_column, '\s+', ''));


If you want a case-insensitive index (where name 1 and NAME 1 are taken as the same value) you need to convert everything to lower or uppercase:

create unique index ix_name 
   on the_table(upper(regexp_replace(the_column, '\s+', '')));