
Security Fundamentals
Turtles, Clams, and Cyber Threat Actors: Shell Usage
The Socket Threat Research Team uncovers how threat actors weaponize shell techniques across npm, PyPI, and Go ecosystems to maintain persistence and exfiltrate data.
redux-form-validations
Advanced tools
A collection of utilities for validations in redux-form V6
Note: this project is under initial development, API may change (we will follow sem-ver).
$ npm install --save redux-form-validations
import { React } from 'react';
import { reduxForm } from 'redux-form';
import { buildValidations, isPresent, isZipCode, isDateInPast, isDateAfter } from 'redux-form-validations';
import { uniq } from 'lodash';
const { warn, validate } = buildValidations({
firstName: {
validate: isPresent
},
lastName: {
warn: {
...isPresent,
errorMessage: 'Last names are helpful'
}
},
zipCode: {
validate: {
...isZipCode,
required: true
}
},
dateApplied: {
validate: [
isDateInPast,
isDateAfter('04/19/1988'),
{
...isPresent,
validateIf: (allValues, value) => allValues.dependentField
}
]
},
_fieldArrays: {
hobbies: {
_error: {
validate: {
validator: (fields) => {
const names = field.map(field => field.name);
return uniq(names).length === names.length;
},
errorMessage: 'Hobby names must be unique'
}
}
}
}
});
class MyForm extends React.Component { ... }
export default reduxForm({ warn, validate })(MyForm);
Every field defined in your schema object has top-level keys warn
and validate
which are used to build warn and validate functions for redux-form connected components. These keys take a validator object, which has the shape:
validator
: Function (allFields, value) => Boolean
If the return value is true, then the field is valid, if false, an error is added.
errorMessage
: String || Function (allField, value) => String
The error message that is returned with the validate
or warn
function call when the validator
returns false.
redux-form-schema is the main inspiration for this project. After redux-form moved to V6, this project was deprecated, since a large part of its functionality was obselete. However, we still liked being able to define our validations with a simple and declarative API. This small library aims to supply that abstraction with some built-in validators and configuration options.
This is a green project, and we are open to feature suggestions and other improvements. Additionally, you can contribute by helping with these outstanding todos:
FAQs
Validation utilities for redux-form v6
The npm package redux-form-validations receives a total of 16 weekly downloads. As such, redux-form-validations popularity was classified as not popular.
We found that redux-form-validations 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 Fundamentals
The Socket Threat Research Team uncovers how threat actors weaponize shell techniques across npm, PyPI, and Go ecosystems to maintain persistence and exfiltrate data.
Security News
At VulnCon 2025, NIST scrapped its NVD consortium plans, admitted it can't keep up with CVEs, and outlined automation efforts amid a mounting backlog.
Product
We redesigned our GitHub PR comments to deliver clear, actionable security insights without adding noise to your workflow.