is it possible to add a custom constraint in PostgreSQL

Now I have a table store some rss subscribe url, sometimes the url end with “”, now I replace all url without end with “”. to make sure the sub url did not end with “”. I want to add a custom constraint in the rss sub source table. If the sub url end with “”, throw error to the app. I have read the PostgreSQL 13 docs, and found it have many constraint like uniq constraint check constraint with the int data type. but how to add an constraint with a string data type and make sure the string did not end with “”? is there any way to do this action?