OSDN Git Service
(root)
/
bytom
/
bytom-electron.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8a31adc
)
validate key alias before creating
author
Yongfeng LI
<wliyongfeng@gmail.com>
Thu, 18 Jan 2018 01:39:38 +0000
(09:39 +0800)
committer
Yongfeng LI
<wliyongfeng@gmail.com>
Thu, 18 Jan 2018 01:39:38 +0000
(09:39 +0800)
src/features/mockhsm/components/New.jsx
patch
|
blob
|
history
diff --git
a/src/features/mockhsm/components/New.jsx
b/src/features/mockhsm/components/New.jsx
index
d3bd1b5
..
58d7006
100644
(file)
--- a/
src/features/mockhsm/components/New.jsx
+++ b/
src/features/mockhsm/components/New.jsx
@@
-47,5
+47,14
@@
export default BaseNew.connect(
reduxForm({
form: 'newMockHsmKey',
fields,
+ validate: values => {
+ const errors = {}
+
+ if (!values.alias) {
+ errors.alias = 'Key alias is required'
+ }
+
+ return errors
+ }
})(New)
)