Read keyboard input as a string and validate that string using LVGL

I want to read keyboard inputs, my screen has id and password fields. And I need to check whether user entered correct id/pwd and validate those fields.
e.g., id --------
pwd --------
I want to check if user has entered “user” and “admin” as a id and password respectively.