add additional password mask controls

This commit is contained in:
Rick Watson 2019-04-17 00:11:37 +01:00
parent ac47377396
commit f2e46d55f3
2 changed files with 4 additions and 2 deletions

View File

@ -10,6 +10,7 @@ import MenuItem from '@material-ui/core/MenuItem';
import { TextValidator, ValidatorForm, SelectValidator } from 'react-material-ui-form-validator';
import {isAPEnabled} from '../constants/WiFiAPModes';
import PasswordValidator from '../components/PasswordValidator';
const styles = theme => ({
loadingSettings: {
@ -73,7 +74,7 @@ class APSettingsForm extends React.Component {
onChange={handleValueChange('ssid')}
margin="normal"
/>
<TextValidator
<PasswordValidator
validators={['required', 'matchRegexp:^.{0,64}$']}
errorMessages={['Access Point Password is required', 'Access Point Password must be 64 characters or less']}
name="password"

View File

@ -12,6 +12,7 @@ import FormControlLabel from '@material-ui/core/FormControlLabel';
import isIP from '../validators/isIP';
import isHostname from '../validators/isHostname';
import or from '../validators/or';
import PasswordValidator from '../components/PasswordValidator';
const styles = theme => ({
loadingSettings: {
@ -83,7 +84,7 @@ class OTASettingsForm extends React.Component {
margin="normal"
/>
<TextValidator
<PasswordValidator
validators={['required', 'matchRegexp:^.{0,64}$']}
errorMessages={['OTA Password is required', 'OTA Point Password must be 64 characters or less']}
name="password"