
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
mobx-valite-form-store
Advanced tools
valite form StoreA MobX form store using valite as validator.
This module is published under NPM Registry, so you can install using NPM, Yarn and other package managers.
npm install --save mobx-valite-form-store
# Use the command below if you're using Yarn.
yarn add mobx-valite-form-store
This module provides a store class to handle form states, validators & their error states.
import React, { Component } from 'react';
import { observer } from 'mobx-react';
import { observable } from 'mobx';
import FormStore from 'mobx-valite-form';
// An validator schema for entries object.
const validators = {
name: [
(name) => (typeof name === 'string' && !!name.trim()) || 'Name is a required entry.',
(name) => (name.length > 2 && name.length < 30) || 'Name should have between 2 and 30 chars.'
]
};
@observer
export default class Form extends Component {
@observable store = new FormStore({ name: '' }, validators);
onSubmit = async () => {
await this.store.validateEntries();
if (!this.store.isValid)
return;
this.props.onSave(this.store.entries);
};
render () {
return (
<form>
<input
value={ this.store.entries.name }
onChange={ (e) => this.store.setEntry('name', e.target.value) }
/>
{ this.store.errors.name && <span>{ this.store.errors.name }</span> }
</form>
);
}
}
Released under MIT license.
FAQs
A MobX form store using `valite` as validator.
We found that mobx-valite-form-store 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.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.