I'd create a form, use it to submit data, I want to confirm all items within the form are valid, so I write a simple filter in my following code(red words), it alert me

Code:
	Ext.onReady(function(){
						 
		Ext.QuickTips.init();
		
		var newadmin = new Ext.FormPanel({
				labelWidth: 150, // label settings here cascade unless overridden
				labelAlign: 'right',
				//url:'newadmin.jsp',
				frame:true,
				title: 'Register as Administrator',
				bodyStyle:'padding:5px 5px 0',
				width: 600,
				defaults: {width: 312},
				defaultType: 'textfield',
		
				items: [{
						fieldLabel: 'Administrator Name',
						name: 'adminName',
						id: 'adminName',
						allowBlank:false
					},{
						fieldLabel: 'Password',
						inputType: 'password',
						name: 'passwd',
						allowBlank:false
					},{
						fieldLabel: 'Confirm Password',
						inputType: 'password',
						name: 'password_cf',
						validator: vailda,
						invalidText: ' Confirm password not equal to password',
						allowBlank:false
					},{
						fieldLabel: 'Email',
						name: 'emailadr',
						vtype:'email'
				}],
				buttons: [{
					text: 'Register',
					if(items.isValid()){
						handler:doSave
					},
					id:'btnSave'
				},{
					text: 'reset',
					handler: function() {
							newadmin.form.reset();
					}
				}]
		});

		function vailda()
		{
				if(Ext.get('passwd').dom.value==Ext.get('password_cf').dom.value)
					return true;
					else
					return false;
		}

		function doSave(){
				Ext.MessageBox.show({
					msg: 'Data saving, please wait',
					progressText: 'Saving',
					width:300,
					wait:true,
					waitConfig: {interval:200},
					icon:'ext-mb-save',
					nimEl: 'btnSave'
				});
				newadmin.getForm().submit({
					url:'newadmin_i.jsp',
					method:'POST',
					success: function(form, action){
						Ext.MessageBox.hide();
						Ext.MessageBox.alert('System Message', 'Data save success');
						//newwin.hide();
						//ds.load();
					},
					failure: function(form, action){
						Ext.MessageBox.hide();
						Ext.MessageBox.show({
							title:'Error',
							msg: 'Data save failure',
							buttons: Ext.Msg.OK,
							icon: Ext.MessageBox.ERROR
						});
					}
				})
		};

		newadmin.render("newadmin");
		Ext.getDom("adminName").focus();

	});
error message
Code:
missing : after property id
[Break on this error] if(items.isValid()){\n
Can any one told me which part I got wrong? thanks