robbieaverill

maybe ->removeRequiredField('FirstName')? if you don't have access to the validator instance you could do it with injector config, e.g.

  1. Blah\Injector:
  2. Blah\Member_Validator:
  3. calls:
  4. removeFirstName: [ removeRequiredField, [ FirstName ] ]

which would call that whenever injector instantiates a member validator

null

The customRequired field is allegedly configurable (it's called via $this->config() in actual use, despite being camelCased and neither private, nor static), but FirstName is hardcoded into the variable. Any changes I make via config seem to be additive?

From the example code:

  1. Member_Validator:
  2. customRequired:
  3. - Surname

The actual variable is this:

  1. protected $customRequired = array(
  2. 'FirstName',
  3. 'Email'
  4. );
null

Any ideas on how to remove FirstName from the Member_Validator?

Nightcrawler

use case being partial translation of a website and indicating if the actual page is available in another defined locale. I set a fallback to English anyway but it would be nice to know before you click on a link...

Nightcrawler

I'll dig around fluent a bit more, this should be a fairly common use case, I was just surprised that it's not in the docs, at least I haven't found it yet...

gened

Yeah i’d need to see the db sorry, you could do a join to the above query to filter by what is in UserDefinedForm_Localised_Live but that is getting tricky. I’d be certain there is a ‘easier’ way via the Fluent API to find what you need. Maybe someone who has used fluent before can help

Nightcrawler

just to bounce some more ideas...it looks it did create something like UserDefinedForm_Localised_Live. So I would probably have to extend SiteTree somehow with the check function so it would be available in all PageTypes...