Text validation function working in Godot, but not on ios phone, any ideas?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By dap404

What it does is not allow anything but letters and numbers and the word must be 3-11 in length, which works fine.
Every time you type a letter, the edit text change is called and we do a check to make sure it doesnt contain an illegal word.

Tested a bunch in godot and works great with the runner but on iphone it seems to not work.

var prohibited_name_list = [
"butt", "ace", "test", "bad", "word"
]

func _on_name_edit_text_changed(new_text):
    confirm_button.disabled = true
    var word = ""
    regex.compile("[a-zA-Z0-9]+")

    for curr in regex.search_all(new_text):
	    word += curr.get_string()
	
    entered_name.set_text(word)
    entered_name.caret_column = word.length()
    confirm_botton_check(entered_name.text)

func confirm_botton_check(word:String):
    if word.length() > 3 and word.length() < 12:
    	var is_bad = false
	print(word)
    for bad_word in prohibited_name_list:
		if word.contains(bad_word):
			is_bad = true
			break
	if !is_bad:
		confirm_button.disabled = false

note
So on ios if i type butt123 it does not throw an error
BUT if i add a character(s) before it like xbutt123 it catches it on ios fine.
Super confused.

:bust_in_silhouette: Reply From: dap404

make sure to swichc your case all to lower before checking, ios auto caps the first letter of any text field by default