Custom field validators editor make field as required

Custom field validators editor make field as required

eyal_hbeyal_hb Posts: 98Questions: 31Answers: 0

here my code, if IsAlphabets true so return null else return message

.Field(new Field("Tours_Operation.Tour_Code_1").Xss(false)
                .Validator(Validation.MaxLen(3, new ValidationOpts
                {

                    Message = "מקסימום 3 תווים"
                }))
                .Validator((val, d, host) => Functions.IsAlphabets(Convert.ToString(val))
                    ? null
                    : "שדה מוגבל ל3 תווים באנגלית בלבד"
                )

This question has an accepted answers - jump to answer

Answers

  • colincolin Posts: 15,240Questions: 1Answers: 2,599
    Answer ✓

    I'm sorry, but I'm not clear what the question is. Please could you add more detail,

    Colin

  • eyal_hbeyal_hb Posts: 98Questions: 31Answers: 0

    i figured out what was the problem, thanks

This discussion has been closed.