Validating text box

Hi,
i’m jus trying to validate my text box with the given given user name and password… i hav jus predefined the values for username and password… help me how to validate it…