RequiredIfFalse and Range attribute

Oct 24, 2013 at 7:55 AM
Hello,

I can't figure out a way to have the Range attribute working as the requiredIfFalse attribute.
[RequiredIfFalse("UnEquip", ErrorMessage = "Le champ 'Nombre de salariés' doit être renseigné")]
        [Range(1, 1000000, ErrorMessage = "Le nombre de salariés doit être compris entre 1 et 1000000")]
        public int Salaries { get; set; }
how can i do so that the range attribute do not triger if UnEquip is false ?