I am writing one validation rule where status is Pending/In Progress and I am changing any value from record then I need to throw an error 'you cannot edit the record'.
AND(OR( ISPICKVAL( Status , 'Pending'), ISPICKVAL( Status , 'InProgress'))
The issue here it's not allow me to set status Pending at all..then i Added
OR( AND( ISPICKVAL(PRIORVALUE(Status),"Pending"),ISPICKVAL( Status , 'Pending')), AND( ISPICKVAL(PRIORVALUE(Status),"InProgress"),ISPICKVAL( Status , 'InProgress')))
Again the issue is when I Set status from suppose Review to Pending then it will save. which is correct, and then if I try to edit record then it will be thrown an error. but when I am changing the value from Pending to something else like Complete then it should not be thrown an error, but because of PRIORVALUE() its throwing error.