Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
@mathewparet/form-error-control
Advanced tools
A form control mechanism to handle forms and errors returned by laravel and disable controls or show errors accordingly
A js form and error class to easily handle errors returned by Laravel. Attach input controls to the form object to see magic!
npm i @mathewparet/form-error-control
import Form from "@mathewparet/form-error-control";
registrationForm = new Form({
name: null,
email: null,
password: null,
password_confirmation: null,
});
// use this form varible as model holder for form controls
To submit form using this form module, just call <form-object>.<method>(<url>)
. This returs a promise. Before the promise then
or catch
is called the form.errors
object will be populated with any errors returned by Laravel.
function submitForm(e)
{
e.preventDefault();
this.registrationForm.post('/api/register')
.then(response => console.log(response))
.catch(error => console.log(error));
}
To automatically clear form error variables when fields are updated, assign a callback to the keyDown
event of the form:
function formKeyDownEvent($event)
{
registrationForm.errors.clear($event.target.name);
}
registrationForm.errors.get('name');
registrationForm.errors.has('name');
<form-object>.busy
will be set to true when the form has been submitted, but no response (success or error) has been returned yet.
FAQs
A form control mechanism to handle forms and errors returned by laravel and disable controls or show errors accordingly
The npm package @mathewparet/form-error-control receives a total of 0 weekly downloads. As such, @mathewparet/form-error-control popularity was classified as not popular.
We found that @mathewparet/form-error-control 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
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.