Here is the code:
If you will enter any text or a number, it will display error message:
If you will enter decimal number, it will display success message:
If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.