
Research
/Security News
Contagious Interview Campaign Escalates With 67 Malicious npm Packages and New Malware Loader
North Korean threat actors deploy 67 malicious npm packages using the newly discovered XORIndex malware loader.
notesgen-validation
Advanced tools
this package contain all type of validations
https://github.com/Aabir1/notesgen-forms-validation
npm i notesgen-validation
import NotesgenValidation from 'notesgen-validation';
// simple usage
const result = NotesgenValidation.isNumber(123123);
// use this function to validate the complete form.
validate = () => {
let errors = {}
let isValid = true;
if (NotesgenValidation.isEmpty(this.state.model.link)) {
errors.link = "link field cannot be empty."
isValid = false
} else if (!NotesgenValidation.isUrl(this.state.model.link)) {
errors.link = "Please enter valid url."
isValid = false
}
if (NotesgenValidation.isEmpty(this.state.model.title)) {
errors.title = "Title field cannot be empty."
isValid = false
} else if (NotesgenValidation.isNumber(this.state.model.title)) {
errors.title = "Numbers are not allowed in title field."
isValid = false
}
if (!NotesgenValidation.isFile(file)) {
errors.image = 'Please select valid image.';
result = false;
} else if (!NotesgenValidation.isValidFileSize(file)) {
errors.image = 'Image should not be greater than 2MB.';
result = false;
}
this.setState({ errors: errors })
return isValid;
}
submitForm = async () => {
if (this.validate()) {
// you api call
//whatever you wanna do after validation
}
}
It is a basic validator if any validator is missing, please raise an issue at https://github.com/Aabir1/notesgen-forms-validation/issues.
FAQs
All type of form validations on a website
The npm package notesgen-validation receives a total of 1 weekly downloads. As such, notesgen-validation popularity was classified as not popular.
We found that notesgen-validation demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
/Security News
North Korean threat actors deploy 67 malicious npm packages using the newly discovered XORIndex malware loader.
Security News
Meet Socket at Black Hat & DEF CON 2025 for 1:1s, insider security talks at Allegiant Stadium, and a private dinner with top minds in software supply chain security.
Security News
CAI is a new open source AI framework that automates penetration testing tasks like scanning and exploitation up to 3,600× faster than humans.