Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

alaska-field-text

Package Overview
Dependencies
Maintainers
1
Versions
29
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

alaska-field-text - npm Package Compare versions

Comparing version 0.12.12 to 0.13.0

2

package.json
{
"name": "alaska-field-text",
"version": "0.12.12",
"version": "0.13.0",
"description": "Alaska text field",

@@ -5,0 +5,0 @@ "keywords": [

@@ -12,11 +12,10 @@ // @flow

shouldComponentUpdate(props: Alaska$view$Field$View$Props): boolean {
return !shallowEqualWithout(props, this.props, 'record', 'onChange', 'model', 'field');
shouldComponentUpdate(nextProps: Alaska$view$Field$View$Props): boolean {
return nextProps.record._id !== this.props.record._id ||
!shallowEqualWithout(nextProps, this.props, 'record', 'onChange', 'model');
}
hasError() {
let {
field,
value
} = this.props;
getError(): string {
const { t } = this.context;
const { field, value } = this.props;
if (value && field.match && typeof field.match === 'string') {

@@ -27,7 +26,7 @@ let matchs = field.match.match(/^\/(.+)\/([igm]*)$/);

if (!match.test(value)) {
return true;
return t('Invalid format');
}
}
}
return false;
return '';
}

@@ -53,11 +52,3 @@

className += ' text-field';
if (!errorText && value && field.match && typeof field.match === 'string') {
let matchs = field.match.match(/^\/(.+)\/([igm]*)$/);
if (matchs) {
let match = new RegExp(matchs[1], matchs[2]);
if (!match.test(value)) {
errorText = t('Invalid format');
}
}
}
errorText = errorText || this.getError();
if (errorText) {

@@ -64,0 +55,0 @@ className += ' has-error';

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc