for question #2, I know about intRange , but the max is not static, the max is the number of rows passed from database, how to pass the max returned in the action to the validator xml file. thanks.
The validator framework and the default set of rules provide a 95% solution. This type of validation falls into the 5% that is not covered. You could either develop a custom validation rule or just implement the validation in your form's validate method.