muba-input-text 3.0.3 → 3.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/InputText.js +2 -1
  2. package/package.json +1 -1
package/InputText.js CHANGED
@@ -114,7 +114,8 @@ export default class InputText extends React.Component {
114
114
  return false;
115
115
  } else {
116
116
  const pattern = new RegExp("[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])", 'i');
117
- const success = !!pattern.test(this.props.value);
117
+ const patternSpaces = new RegExp(/\s/);
118
+ const success = !!pattern.test(this.props.value) && !patternSpaces.test(this.props.value);
118
119
 
119
120
  if (!success) {
120
121
  // It's invalid
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "muba-input-text",
3
- "version": "3.0.3",
3
+ "version": "3.0.4",
4
4
  "description": "Input text",
5
5
  "main": "InputText.js",
6
6
  "scripts": {