import Text from './Text' ; export default class Word extends Text { saltRounds : number ; constructor ( min = undefined , max = undefined , defaultVal = undefined , flags = null ) { super ( min , max , defaultVal , flags ) ; this . assert ( /[^\w]/ , false , 'must contain only alphanumeric characters' ) ; } async parse ( value ) { const check = await super . parse ( value ) ; if ( ! check ) { return check ; } return check . toLowerCase ( ) ; } }