+ // Handle dialog element validation state UI changes.\r
+ function handleFieldValidated( isValid, msg )\r
+ {\r
+ var input = this.getInputElement();\r
+ if ( input )\r
+ {\r
+ isValid ? input.removeAttribute( 'aria-invalid' )\r
+ : input.setAttribute( 'aria-invalid', true );\r
+ }\r
+\r
+ if ( !isValid )\r
+ {\r
+ if ( this.select )\r
+ this.select();\r
+ else\r
+ this.focus();\r
+ }\r
+\r
+ msg && alert( msg );\r
+\r
+ this.fire( 'validated', { valid : isValid, msg : msg } );\r
+ }\r
+\r
+ function resetField()\r
+ {\r
+ var input = this.getInputElement();\r
+ input && input.removeAttribute( 'aria-invalid' );\r
+ }\r
+\r
+\r