public FormInputValidator fileExists ( VisValidatableTextField field , FileHandle relativeTo , String errorMsg ) { FileExistsValidator validator = new FileExistsValidator ( relativeTo . file ( ) , errorMsg ) ; field . addValidator ( validator ) ; add ( field ) ; return validator ; }
Validates if relative path entered in text field points to an existing file .