Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed negative input in Logarithm Calculator #660

Closed
wants to merge 2 commits into from

Conversation

pankaj-2503
Copy link

@pankaj-2503 pankaj-2503 commented May 10, 2024

Fixes Issue🛠️

Closes #630

Description👨‍💻

Added onchange property to call function validateInput() which check if input ==0 or input ==1 then alert this can't be used in log base.Similary number can be only positive.

Type of change📄

function validateInput(){
	var input=document.getElementById('base');
	if(input.value==1 || input.value==0){
		alert("Invalid input log's base can take value between 0 & 1 or positive value except 1");
	}
}
  • Bug fix (non-breaking change which fixes an issue)

How this has been tested✅

Locally on my pc

Checklist✅

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have added demonstration in the form of GIF/video file
  • I am an Open Source Contributor

Screenshots/GIF📷

Copy link

netlify bot commented May 10, 2024

Deploy Preview for calcdiverse ready!

Name Link
🔨 Latest commit ba8739d
🔍 Latest deploy log https://app.netlify.com/sites/calcdiverse/deploys/663e62f29e9c5200080d7c13
😎 Deploy Preview https://deploy-preview-660--calcdiverse.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @pankaj-2503, Welcome to the project CalcDiverse! 🎊
Thanks for your contribution! Your effort makes this project better. Keep it up! 🙌
Please wait for the PR to be reviewed. Happy Coding!! ✨

@Rakesh9100
Copy link
Owner

Pls don't create PR until you are assigned to an issue @pankaj-2503

@Rakesh9100 Rakesh9100 closed this May 19, 2024
@Rakesh9100 Rakesh9100 changed the title Updated valid input on change in input box Fixed negative input in Logarithm Calculator May 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug] Fix negative inputs in Logarithm Calculator
2 participants