add pattern validation not working

pattern validation not working, for id when a signed in member changes their id i want it to be so no special characters are entered in the custom user id. Can someone help??