Check out example codes for "check constraint is violated". It will help you in understanding the concepts better.

Code Example 1

CONSTRAINT ck_ni_number
  CHECK (REGEXP_LIKE(ni_number, '[a-z][a-z][0-9][0-9][0-9][0-9][0-9][0-9][a-z]'))

Learn ReactJs, React Native from akashmittal.com