Formatting
This commit is contained in:
parent
4fdbc5b4cb
commit
6835f149c3
@ -1,6 +1,6 @@
|
|||||||
import FormMixin from '../../mixins/form'
|
import FormMixin from '../../mixins/form'
|
||||||
import textinput from '../text_input'
|
import textinput from '../text_input'
|
||||||
import * as R from "ramda"
|
import * as R from 'ramda'
|
||||||
|
|
||||||
const createEnvironment = name => ({ name })
|
const createEnvironment = name => ({ name })
|
||||||
|
|
||||||
@ -69,7 +69,9 @@ export default {
|
|||||||
validate: function() {
|
validate: function() {
|
||||||
// Only take first error message
|
// Only take first error message
|
||||||
this.errors = R.pipe(
|
this.errors = R.pipe(
|
||||||
R.map((validation) => !validation.func() ? validation.message : undefined),
|
R.map(validation =>
|
||||||
|
!validation.func() ? validation.message : undefined
|
||||||
|
),
|
||||||
R.filter(Boolean),
|
R.filter(Boolean),
|
||||||
R.take(1)
|
R.take(1)
|
||||||
)(this.validations)
|
)(this.validations)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user