I currently developing a rest API with elixir and plug.
I will like to validate user input to accept only letters, but when I use the regex, it only validates a letter, not the full string.
String.match?(“A”, ~r/^[a-z]$/i) returns true, but when I try String.match?(“foo”, ~r/^[a-z]$/i) returns false.
Any help, please?