mirror of
https://github.com/balena-io/balena-cli.git
synced 2024-12-30 10:38:50 +00:00
20 lines
409 B
CoffeeScript
20 lines
409 B
CoffeeScript
|
validEmail = require('valid-email')
|
||
|
|
||
|
exports.validateEmail = (input) ->
|
||
|
if not validEmail(input)
|
||
|
return 'Email is not valid'
|
||
|
|
||
|
return true
|
||
|
|
||
|
exports.validatePassword = (input) ->
|
||
|
if input.length < 8
|
||
|
return 'Password should be 8 characters long'
|
||
|
|
||
|
return true
|
||
|
|
||
|
exports.validateApplicationName = (input) ->
|
||
|
if input.length < 4
|
||
|
return 'The application name should be at least 4 characters'
|
||
|
|
||
|
return true
|