import * as moment from 'moment' ; export function containNameCharactersOnly ( str ) { const testRegExp = /^([a-zA-Z0-9_]+)$/ ; const match = testRegExp . exec ( str ) ; return ( match ) ? true : false ; } export function containAlphabetsOnly ( str ) { const testRegExp = /^([a-zA-Z]+)$/ ; const match = testRegExp . exec ( str ) ; return ( match ) ? true : false ; } export function isValidApiAcceptedDateString ( str ) { return moment ( str , 'YYYY-MM-DD_HH:mm' , true ) . isValid ( ) ; }