Hi @Nisha_K21
In order to validate fields first click on the username field and go to create rule there you can use set value option
Item to set : Username variable
value : (pagename).username.value
Do the same thing for password as well.
Finally in the login button create a rule to check username and password contains null or not
If : Username is vbNullString or Password is vbNullString
Then: Show Error Message
Else : Show Success message
Hope this will solve your question
Regards,
Manisha